aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test/script/parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-11-14 16:25:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-11-14 16:25:03 +0200
commit11f990b55294a9eb8d5d4f29fa9a277702ca72b9 (patch)
tree0144fbdc2a5b402f8690279ca4d729cbaa7ab213 /libbuild2/test/script/parser.cxx
parent3449948b4e56bcb37df4f980c71d907118d7a483 (diff)
Cleanup attribute parsing code
Diffstat (limited to 'libbuild2/test/script/parser.cxx')
-rw-r--r--libbuild2/test/script/parser.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/libbuild2/test/script/parser.cxx b/libbuild2/test/script/parser.cxx
index aa78437..302ec84 100644
--- a/libbuild2/test/script/parser.cxx
+++ b/libbuild2/test/script/parser.cxx
@@ -1292,8 +1292,7 @@ namespace build2
// want to treat as a literal.
//
mode (lexer_mode::variable_line);
- enable_attributes (); // @@ VAL
- next (t, tt);
+ next_with_attributes (t, tt);
// Parse value attributes if any. Note that it's ok not to have
// anything after the attributes (e.g., foo=[null]).
@@ -3453,8 +3452,7 @@ namespace build2
token t;
type tt;
- enable_attributes (); // Enable `[` recognition.
- next (t, tt);
+ next_with_attributes (t, tt); // Enable `[` recognition.
if (tt != type::lsbrace && tt != type::eos)
fail (t) << "expected '[' instead of " << t;