From a599248e9dfab9f5d57c06bed56f75941cb00047 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 10 Sep 2021 13:38:03 +0200 Subject: Add multi-argument grouping support in group_scanner --- cli/cli/runtime-header.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'cli/cli/runtime-header.cxx') diff --git a/cli/cli/runtime-header.cxx b/cli/cli/runtime-header.cxx index 5bbe5c6..2148941 100644 --- a/cli/cli/runtime-header.cxx +++ b/cli/cli/runtime-header.cxx @@ -605,21 +605,20 @@ generate_runtime_header (context& ctx) << "static separator" << endl << "sense (const char*);" << endl - << "// If the state is scanned or skipped, then scan the" << endl - << "// leading groups and save the next (unescaped) argument in" << endl - << "// arg_. If the state is peeked, then scan the trailing" << endl - << "// groups. In both cases set the new state." << endl + + << "// Scan the leading groups, the next argument/argument pack,"<< endl + << "// and the trailing groups." << endl << "//" << endl << "void" << endl - << "scan_group (state);" + << "scan_group ();" << endl << "scanner& scan_;" << "state state_;" << endl << "// Circular buffer of two arguments." << endl << "//" << endl - << "std::string arg_[2];" - << "std::size_t i_;" + << "std::vector arg_[2];" + << "std::size_t i_, j_, pos_;" << endl << "std::vector group_;" << "vector_scanner group_scan_;" -- cgit v1.1