diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-09-25 13:44:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-09-30 15:29:50 +0200 |
commit | ea997c89f7ea59db0164c79ac0fda5b607754753 (patch) | |
tree | 2067c898434d9da4f6cadf0e50737f930b299616 /libbuild2/parser.hxx | |
parent | c595aac0142436f64ada4f5412b821bfcc6db008 (diff) |
Pattern matching support (switch): single value implementation
Diffstat (limited to 'libbuild2/parser.hxx')
-rw-r--r-- | libbuild2/parser.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbuild2/parser.hxx b/libbuild2/parser.hxx index 2f70a18..3014681 100644 --- a/libbuild2/parser.hxx +++ b/libbuild2/parser.hxx @@ -142,6 +142,9 @@ namespace build2 parse_if_else (token&, token_type&); void + parse_switch (token&, token_type&); + + void parse_for (token&, token_type&); void @@ -194,6 +197,12 @@ namespace build2 value parse_eval_value (token&, token_type&, pattern_mode, bool = false); + // Compare two values in a type-aware manner. If one value is typed while + // the other is not, convert the untyped one to the other's type. + // + bool + compare_values (token_type, value&, value&, const location&) const; + // Attributes stack. We can have nested attributes, for example: // // x = [bool] ([uint64] $x == [uint64] $y) |