From ece4003beebd23082a5fd7a324de40c5572161d1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 16 Mar 2017 10:35:32 +0200 Subject: Add support for passing parameters to (meta-) operations --- build2/spec.cxx | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'build2/spec.cxx') 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 << ')'; -- cgit v1.1