diff options
Diffstat (limited to 'build2/parser.cxx')
-rw-r--r-- | build2/parser.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx index 64907b4..341ba34 100644 --- a/build2/parser.cxx +++ b/build2/parser.cxx @@ -1836,12 +1836,12 @@ namespace build2 // Using '@' for attribute key-value pairs would be just too ugly. Seeing // that we control what goes into keys/values, let's use a much nicer '='. // - mode (lexer_mode::value, '='); + mode (lexer_mode::attribute, '='); next (t, tt); - if (tt != type::rsbrace && tt != type::newline && tt != type::eos) + if (tt != type::rsbrace) { - names ns (parse_names (t, tt, false, "key-value", nullptr)); + names ns (parse_names (t, tt, false, "attribute", nullptr)); if (!pre_parse_) { @@ -1880,12 +1880,6 @@ namespace build2 } } - // Manually expire the value mode if we haven't reached newline/eos (where - // it expires automatically). - // - if (mode () == lexer_mode::value) - expire_mode (); - if (tt != type::rsbrace) fail (t) << "expected ']' instead of " << t; |