From 7cc8afb67fecf61994ad6c345559617f374e9d20 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Sep 2021 08:28:53 +0200 Subject: Add argument grouping support for dependencies in bdep-{sync,init} --- bdep/utility.hxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'bdep/utility.hxx') 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& 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. -- cgit v1.1