diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-10 13:38:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-10 13:38:03 +0200 |
commit | a599248e9dfab9f5d57c06bed56f75941cb00047 (patch) | |
tree | 1dc188ebf4002e9c1cded6a1edb9011304c146a0 /cli/cli/runtime-header.cxx | |
parent | fab7d03508109bffb23cde8f46ed19e3d9400308 (diff) |
Add multi-argument grouping support in group_scanner
Diffstat (limited to 'cli/cli/runtime-header.cxx')
-rw-r--r-- | cli/cli/runtime-header.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
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<std::string> arg_[2];" + << "std::size_t i_, j_, pos_;" << endl << "std::vector<std::string> group_;" << "vector_scanner group_scan_;" |