aboutsummaryrefslogtreecommitdiff
path: root/build2/parser
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-05 15:09:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-05 15:09:04 +0200
commit54870fb76b5f59cc2e6d69a8c7a8ef17853a0029 (patch)
tree770b01aa56348ec75f17fb834a2a7123ba9c3f73 /build2/parser
parentef7cb7ea3e6fcb21a4fcf38602b3f43f03232ace (diff)
Add comma, ternary, logical operators support in eval context
Diffstat (limited to 'build2/parser')
-rw-r--r--build2/parser25
1 files changed, 20 insertions, 5 deletions
diff --git a/build2/parser b/build2/parser
index e1f6e77..45f5b16 100644
--- a/build2/parser
+++ b/build2/parser
@@ -110,15 +110,30 @@ namespace build2
value&& rhs,
token_type kind);
- // Return the value (can be NULL/typed) as well as the indication of
- // whether this is a non-empty eval context (i.e., '()' potentially with
- // whitespace in between).
+ // Return the value pack (values can be NULL/typed). Note that for an
+ // empty eval context ('()' potentially with whitespaces in between) the
+ // result is an empty pack, not a pack of one empty.
//
- pair<value, bool>
+ values
parse_eval (token&, token_type&);
+ values
+ parse_eval_comma (token&, token_type&, bool = false);
+
+ value
+ parse_eval_ternary (token&, token_type&, bool = false);
+
+ value
+ parse_eval_or (token&, token_type&, bool = false);
+
+ value
+ parse_eval_and (token&, token_type&, bool = false);
+
+ value
+ parse_eval_comp (token&, token_type&, bool = false);
+
value
- parse_eval_trailer (token&, token_type&);
+ parse_eval_value (token&, token_type&, bool = false);
// Attributes stack. We can have nested attributes, for example:
//