From 29e274022a8c88dd1a48c1b591635bb044fe808f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 19 Mar 2018 11:43:33 +0200 Subject: Add vector_scanner::reset() --- cli/runtime-header.cxx | 3 +++ cli/runtime-inline.cxx | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'cli') diff --git a/cli/runtime-header.cxx b/cli/runtime-header.cxx index 6dd0899..9861166 100644 --- a/cli/runtime-header.cxx +++ b/cli/runtime-header.cxx @@ -308,6 +308,9 @@ generate_runtime_header (context& ctx) << "std::size_t" << endl << "end () const;" << endl + << "void" << endl + << "reset (std::size_t start = 0);" + << endl << "virtual bool" << endl << "more ();" << endl diff --git a/cli/runtime-inline.cxx b/cli/runtime-inline.cxx index 86aae02..abcf56a 100644 --- a/cli/runtime-inline.cxx +++ b/cli/runtime-inline.cxx @@ -206,6 +206,12 @@ generate_runtime_inline (context& ctx) << "{" << "return i_;" << "}"; + + os << inl << "void vector_scanner::" << endl + << "reset (std::size_t i)" + << "{" + << "i_ = i;" + << "}"; } // argv_file_scanner -- cgit v1.1