From 497793c854b9dfbf70c2c23813b6b7f06012bcc2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 15 Nov 2019 15:00:25 +0200 Subject: Generalize attributes to be comma-separated with arbitrary values Before: x = [string null] After: x = [string, null] --- libbuild2/lexer.hxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libbuild2/lexer.hxx') 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, -- cgit v1.1