diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-02 12:28:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-02 12:28:56 +0200 |
commit | 4bf42322fdd5dd7e01a3f61272bccc4a66a5585f (patch) | |
tree | 158d5f6c960b94923f573bf95d4ee970e87487b6 /build2/parser | |
parent | 1214dffc272f6f0ffee4e8ec203804b21023930d (diff) |
Add attribute syntax infrastructure
Diffstat (limited to 'build2/parser')
-rw-r--r-- | build2/parser | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/build2/parser b/build2/parser index 0e15e4c..a4b5dc5 100644 --- a/build2/parser +++ b/build2/parser @@ -96,6 +96,13 @@ namespace build2 void eval_trailer (token&, token_type&, names_type&); + // If the next token is [, parse the attribute sequence until ] storing + // it in attrs_, get the next token, verify it is not a newline or eos, + // and return true. Otherwise return false. + // + bool + attributes (token&, token_type&); + // If chunk is true, then parse the smallest but complete, name-wise, // chunk of input. Note that in this case you may still end up with // multiple names, for example, {foo bar}. @@ -290,6 +297,9 @@ namespace build2 target* target_; // Current target, if any. scope* scope_; // Current base scope (out_base). scope* root_; // Current root scope (out_root). + + vector<pair<string, string>> attrs_; // Current attributes, if any. + target* default_target_; names_type export_value_; |