diff options
Diffstat (limited to 'cli/runtime-header.cxx')
-rw-r--r-- | cli/runtime-header.cxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/cli/runtime-header.cxx b/cli/runtime-header.cxx index 98a2e5d..50281fa 100644 --- a/cli/runtime-header.cxx +++ b/cli/runtime-header.cxx @@ -292,6 +292,37 @@ generate_runtime_header (context& ctx) << "bool erase_;" << "};"; + // vector_scanner + // + if (ctx.options.generate_vector_scanner ()) + { + os << "class vector_scanner: public scanner" + << "{" + << "public:" << endl + << "vector_scanner (const std::vector<std::string>&, " << + "std::size_t start = 0);" + << endl + << "std::size_t" << endl + << "end () const;" + << endl + << "virtual bool" << endl + << "more ();" + << endl + << "virtual const char*" << endl + << "peek ();" + << endl + << "virtual const char*" << endl + << "next ();" + << endl + << "virtual void" << endl + << "skip ();" + << endl + << "private:" << endl + << "const std::vector<std::string>& v_;" + << "std::size_t i_;" + << "};"; + } + // argv_file_scanner // if (ctx.options.generate_file_scanner ()) |