From 3eb0cd7fe3c1dec0bb3b7e1d225107e55ca4b435 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 Nov 2016 08:47:35 +0200 Subject: Various testscript lexer/parser fixes (testscript) --- build2/test/script/lexer | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'build2/test/script/lexer') diff --git a/build2/test/script/lexer b/build2/test/script/lexer index 5d77ab9..d79ef78 100644 --- a/build2/test/script/lexer +++ b/build2/test/script/lexer @@ -25,8 +25,8 @@ namespace build2 enum { script_line = base_type::value_next, + assign_line, // Auto-expires at the end of the token. variable_line, // Auto-expires at the end of the line. - test_line, command_line, here_line }; @@ -46,14 +46,13 @@ namespace build2 virtual void mode (base_mode, char = '\0') override; - // Return true if we entered the quoted (double or single) mode since - // last reset. + // Number of quoted (double or single) tokens since last reset. // - bool + size_t quoted () const {return quoted_;} void - reset_quoted (bool q) {quoted_ = q;} + reset_quoted (size_t q) {quoted_ = q;} protected: virtual token @@ -63,10 +62,10 @@ namespace build2 next_line (); virtual token - word (bool) override; + word (state, bool) override; protected: - bool quoted_ = false; + size_t quoted_; }; } } -- cgit v1.1