aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/parser.test.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-18 08:00:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-19 13:00:11 +0200
commit6a2d1e3062964fc16cfbc43bc69284f854c35dca (patch)
tree33b10d64adaa01d6afd58f121cb77bdde53d4116 /libbuild2/cc/parser.test.cxx
parentf91468192ad7066a5e6fa63ddc4e4231e632a457 (diff)
Handle C++20 module partitions in scanner
Diffstat (limited to 'libbuild2/cc/parser.test.cxx')
-rw-r--r--libbuild2/cc/parser.test.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/cc/parser.test.cxx b/libbuild2/cc/parser.test.cxx
index e5b3f6a..0c023d3 100644
--- a/libbuild2/cc/parser.test.cxx
+++ b/libbuild2/cc/parser.test.cxx
@@ -45,13 +45,13 @@ namespace build2
unit u (p.parse (is, in));
unit_type ut (u.type);
- for (const module_import& m: u.module_info.imports)
- cout << (m.exported ? "export " : "")
- << "import " << m.name << ';' << endl;
-
if (ut == unit_type::module_iface || ut == unit_type::module_impl)
cout << (ut == unit_type::module_iface ? "export " : "")
<< "module " << u.module_info.name << ';' << endl;
+
+ for (const module_import& m: u.module_info.imports)
+ cout << (m.exported ? "export " : "")
+ << "import " << m.name << ';' << endl;
}
catch (const failed&)
{