aboutsummaryrefslogtreecommitdiff
path: root/bdep/utility.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-09-06 08:28:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-09-06 08:28:53 +0200
commit7cc8afb67fecf61994ad6c345559617f374e9d20 (patch)
treef48380539e68c44c935160a1fc0552e5b4bb8916 /bdep/utility.hxx
parentfce9d3ac79e3ec628baab107b3e71ff815721951 (diff)
Add argument grouping support for dependencies in bdep-{sync,init}cluster-sync
Diffstat (limited to 'bdep/utility.hxx')
-rw-r--r--bdep/utility.hxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/bdep/utility.hxx b/bdep/utility.hxx
index d5e98c8..8e3ca3c 100644
--- a/bdep/utility.hxx
+++ b/bdep/utility.hxx
@@ -303,6 +303,26 @@ namespace bdep
return r;
}
+ namespace cli
+ {
+ class vector_group_scanner: public group_scanner
+ {
+ public:
+ explicit
+ vector_group_scanner (const std::vector<std::string>& args)
+ : group_scanner (scan_), scan_ (args) {}
+
+ void
+ skip_group ()
+ {
+ for (scanner& g (group ()); g.more (); g.skip ()) ;
+ }
+
+ private:
+ vector_scanner scan_;
+ };
+ }
+
// Verify that a string is a valid UTF-8 byte sequence encoding only the
// graphic Unicode codepoints. Issue diagnostics (including a suggestion to
// use option opt, if specified) and fail if that's not the case.