diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-09 17:29:27 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-09 17:29:27 +0200 |
commit | ea22643b2217921df74ea14df47d7c83987d5761 (patch) | |
tree | 91480771997be1b7f92f46ee404c266e0f4dcd76 /build2/test/script/lexer.cxx | |
parent | 1a9d610051cd48c98fb71a570a0871b4e073cec9 (diff) |
Initial parallel scheduler implementation, use to run testscrips
Diffstat (limited to 'build2/test/script/lexer.cxx')
-rw-r--r-- | build2/test/script/lexer.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/build2/test/script/lexer.cxx b/build2/test/script/lexer.cxx index 74aa02e..8bd3484 100644 --- a/build2/test/script/lexer.cxx +++ b/build2/test/script/lexer.cxx @@ -516,7 +516,7 @@ namespace build2 lexer_mode m (st.mode); // Customized implementation that handles special variable names ($*, - // $NN, $~, $@). + // $N, $~, $@). // if (m != lexer_mode::variable) return base_lexer::word (st, sep); @@ -526,23 +526,16 @@ namespace build2 if (c != '*' && c != '~' && c != '@' && !digit (c)) return base_lexer::word (st, sep); - uint64_t ln (c.line), cn (c.column); - string lexeme; - get (); - lexeme += c; - if (digit (c)) - { - for (; digit (c = peek ()); get ()) - lexeme += c; - } + if (digit (c) && digit (peek ())) + fail (c) << "multi-digit special variable name"; state_.pop (); // Expire the variable mode. - return token (move (lexeme), + return token (string (1, c), sep, quote_type::unquoted, false, - ln, cn); + c.line, c.column); } } } |