From 8ad3ca4563b9a1c3daac37a86173789af03f68ba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 11 Nov 2016 10:01:16 +0200 Subject: Get rid of lexer modes overriding pair separators --- build2/parser.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'build2/parser.cxx') diff --git a/build2/parser.cxx b/build2/parser.cxx index eb9f463..bfbaa04 100644 --- a/build2/parser.cxx +++ b/build2/parser.cxx @@ -765,7 +765,7 @@ namespace build2 // The rest should be a list of buildfiles. Parse them as names in the // value mode to get variable expansion and directory prefixes. // - mode (lexer_mode::value); + mode (lexer_mode::value, '@'); next (t, tt); const location l (get_location (t)); names ns (tt != type::newline && tt != type::eos @@ -841,7 +841,7 @@ namespace build2 // The rest should be a list of buildfiles. Parse them as names in the // value mode to get variable expansion and directory prefixes. // - mode (lexer_mode::value); + mode (lexer_mode::value, '@'); next (t, tt); const location l (get_location (t)); names ns (tt != type::newline && tt != type::eos @@ -992,7 +992,7 @@ namespace build2 // switch to the value mode, get the first token, and then re-parse it // manually looking for =/=+/+=. // - mode (lexer_mode::value); + mode (lexer_mode::value, '@'); next (t, tt); // Get variable attributes, if any (note that here we will go into a @@ -1172,7 +1172,7 @@ namespace build2 // The rest should be a list of module names. Parse them as names in the // value mode to get variable expansion, etc. // - mode (lexer_mode::value); + mode (lexer_mode::value, '@'); next (t, tt); const location l (get_location (t)); names ns (tt != type::newline && tt != type::eos @@ -1468,9 +1468,9 @@ namespace build2 } value parser:: - parse_variable_value (token& t, type& tt, lexer_mode m) + parse_variable_value (token& t, type& tt) { - mode (m); + mode (lexer_mode::value, '@'); next (t, tt); // Parse value attributes if any. Note that it's ok not to have anything @@ -1661,7 +1661,7 @@ namespace build2 value parser:: parse_eval (token& t, type& tt) { - mode (lexer_mode::eval); + mode (lexer_mode::eval, '@'); next (t, tt); return parse_eval_trailer (t, tt); } @@ -2792,7 +2792,7 @@ namespace build2 // Turn on the value mode/pairs recognition with '@' as the pair separator // (e.g., src_root/@out_root/exe{foo bar}). // - mode (lexer_mode::value); + mode (lexer_mode::value, '@'); token t; type tt; -- cgit v1.1