aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/lexer.test.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-11-14 12:55:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-11-14 13:20:08 +0200
commit5ec57d68a5205173a02c34a24d7129347d43196c (patch)
tree303de46753bcde9f9ccff094d6591b6bb7583931 /libbuild2/lexer.test.cxx
parent62a688e3fd7d1fdb8ce5590ebe9cb99e90cbe5d7 (diff)
Tighten up attribute recognition during parsing
Now it should be possible to use `[]` for wildcard patterns, for example: foo = foo.[hit]xx Note that a leading bracket expression will still be recognized as attributes and escaping or quoting it will inhibit pattern matching. To resolve this case we need to specify an empty attribute list: foo = [] [abc]-foo.cxx
Diffstat (limited to 'libbuild2/lexer.test.cxx')
-rw-r--r--libbuild2/lexer.test.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/libbuild2/lexer.test.cxx b/libbuild2/lexer.test.cxx
index 32151db..eeed532 100644
--- a/libbuild2/lexer.test.cxx
+++ b/libbuild2/lexer.test.cxx
@@ -31,12 +31,12 @@ namespace build2
quote = true;
else
{
- if (a == "normal") m = lexer_mode::normal;
- else if (a == "variable") m = lexer_mode::variable;
- else if (a == "value") m = lexer_mode::value;
- else if (a == "attribute") m = lexer_mode::attribute;
- else if (a == "eval") m = lexer_mode::eval;
- else if (a == "buildspec") m = lexer_mode::buildspec;
+ if (a == "normal") m = lexer_mode::normal;
+ else if (a == "variable") m = lexer_mode::variable;
+ else if (a == "value") m = lexer_mode::value;
+ else if (a == "attributes") m = lexer_mode::attributes;
+ else if (a == "eval") m = lexer_mode::eval;
+ else if (a == "buildspec") m = lexer_mode::buildspec;
else assert (false);
break;
}