diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-11 10:01:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-11 10:01:16 +0200 |
commit | 8ad3ca4563b9a1c3daac37a86173789af03f68ba (patch) | |
tree | 3a9d8ce49e948720e1e1f847500f5ab5a66ae326 /build2/parser | |
parent | a084c6650036db9f2a8cd69e31492c5dae237793 (diff) |
Get rid of lexer modes overriding pair separators
Diffstat (limited to 'build2/parser')
-rw-r--r-- | build2/parser | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/build2/parser b/build2/parser index 0b3a807..3e6fc00 100644 --- a/build2/parser +++ b/build2/parser @@ -93,11 +93,10 @@ namespace build2 string parse_variable_name (names&&, const location&); - // Note: calls attributes_push() that the caller must pop. Also expects - // the mode to auto-expire. + // Note: calls attributes_push() that the caller must pop. // value - parse_variable_value (token&, token_type&, lexer_mode = lexer_mode::value); + parse_variable_value (token&, token_type&); void apply_variable_attributes (const variable&); @@ -288,7 +287,7 @@ namespace build2 peek (); token_type - peek (lexer_mode m, char ps = '@') + peek (lexer_mode m, char ps = '\0') { // The idea is that if we already have something peeked, then it should // be in the same mode. We also don't re-set the mode since it may have @@ -296,7 +295,7 @@ namespace build2 // if (peeked_) { - assert (peek_.mode == m); + assert (peek_.mode == m && peek_.pair_separator == ps); return peek_.token.type; } @@ -312,7 +311,7 @@ namespace build2 } void - mode (lexer_mode m, char ps = '@') + mode (lexer_mode m, char ps = '\0') { if (replay_ != replay::play) lexer_->mode (m, ps); |