aboutsummaryrefslogtreecommitdiff
path: root/bdep/utility.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bdep/utility.cxx')
-rw-r--r--bdep/utility.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/bdep/utility.cxx b/bdep/utility.cxx
index 15fb599..98b6279 100644
--- a/bdep/utility.cxx
+++ b/bdep/utility.cxx
@@ -133,4 +133,23 @@ namespace bdep
? co.build ().string ().c_str ()
: "b" BDEP_EXE_SUFFIX;
}
+
+ void
+ scan_argument (strings& r, cli::group_scanner& s)
+ {
+ // Copy over the argument including the group.
+ //
+ using scanner = cli::scanner;
+ using group_scanner = cli::group_scanner;
+
+ r.push_back (group_scanner::escape (s.next ()));
+
+ scanner& gs (s.group ());
+ if (gs.more ())
+ {
+ r.push_back ("+{");
+ for (; gs.more (); r.push_back (group_scanner::escape (gs.next ()))) ;
+ r.push_back ("}");
+ }
+ }
}