aboutsummaryrefslogtreecommitdiff
path: root/build2/parser
diff options
context:
space:
mode:
Diffstat (limited to 'build2/parser')
-rw-r--r--build2/parser10
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_;