aboutsummaryrefslogtreecommitdiff
path: root/build2/spec.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-16 10:35:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-16 18:15:18 +0200
commitece4003beebd23082a5fd7a324de40c5572161d1 (patch)
tree44597a24266b31e55b27b7393d2d20c729603d95 /build2/spec.cxx
parentd2b324a72fdf16fcd68e6ba7ca0280aa95de4b71 (diff)
Add support for passing parameters to (meta-) operations
Diffstat (limited to 'build2/spec.cxx')
-rw-r--r--build2/spec.cxx28
1 files changed, 26 insertions, 2 deletions
diff --git a/build2/spec.cxx b/build2/spec.cxx
index c10d966..c6f386c 100644
--- a/build2/spec.cxx
+++ b/build2/spec.cxx
@@ -40,7 +40,6 @@ namespace build2
bool hn (!s.name.empty ());
bool ht (!s.empty ());
- //os << s.name;
os << (hn ? "\"" : "") << s.name << (hn ? "\"" : "");
if (hn && ht)
@@ -49,6 +48,19 @@ namespace build2
for (auto b (s.begin ()), i (b); i != s.end (); ++i)
os << (i != b ? " " : "") << *i;
+ for (const value& v: s.params)
+ {
+ os << ", ";
+
+ if (v)
+ {
+ names storage;
+ os << reverse (v, storage);
+ }
+ else
+ os << "[null]";
+ }
+
if (hn && ht)
os << ')';
@@ -61,7 +73,6 @@ namespace build2
bool hn (!s.name.empty ());
bool ho (!s.empty ());
- //os << s.name;
os << (hn ? "\'" : "") << s.name << (hn ? "\'" : "");
if (hn && ho)
@@ -70,6 +81,19 @@ namespace build2
for (auto b (s.begin ()), i (b); i != s.end (); ++i)
os << (i != b ? " " : "") << *i;
+ for (const value& v: s.params)
+ {
+ os << ", ";
+
+ if (v)
+ {
+ names storage;
+ os << reverse (v, storage);
+ }
+ else
+ os << "[null]";
+ }
+
if (hn && ho)
os << ')';