diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-15 15:00:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-15 15:00:25 +0200 |
commit | 497793c854b9dfbf70c2c23813b6b7f06012bcc2 (patch) | |
tree | be2ec7600889314efbaef22037c094e32b3af6e5 /libbuild2/lexer.hxx | |
parent | 417497632ddfa2bdc17688703c24ca3fd60af318 (diff) |
Generalize attributes to be comma-separated with arbitrary values
Before:
x = [string null]
After:
x = [string, null]
Diffstat (limited to 'libbuild2/lexer.hxx')
-rw-r--r-- | libbuild2/lexer.hxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/lexer.hxx b/libbuild2/lexer.hxx index 3e2fb92..cc9cae6 100644 --- a/libbuild2/lexer.hxx +++ b/libbuild2/lexer.hxx @@ -25,10 +25,11 @@ namespace build2 // values, e.g., `foo = g++`. In contrast, in the variable mode, we restrict // certain character (e.g., `/`) from appearing in the name. The values mode // is like value but recogizes `,` as special (used in contexts where we - // need to list multiple values). The attributes mode is also like value - // except it doesn't treat `{` and `}` as special (so we cannot have name - // groups in attributes) and recognizes the closing `]`. The eval mode is - // used in the evaluation context. + // need to list multiple values). The attributes/attribute_value modes are + // like values where each value is potentially a variable assignment; they + // don't treat `{` and `}` as special (so we cannot have name groups in + // attributes) as well as recognizes `=` and `]`. The eval mode is used in + // the evaluation context. // // A number of modes are "derived" from the value/values mode by recognizing // a few extra characters: @@ -74,6 +75,7 @@ namespace build2 case_patterns, switch_expressions, attributes, + attribute_value, eval, single_quoted, double_quoted, |