From ea997c89f7ea59db0164c79ac0fda5b607754753 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 25 Sep 2019 13:44:31 +0200 Subject: Pattern matching support (switch): single value implementation --- libbuild2/parser.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libbuild2/parser.hxx') 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) -- cgit v1.1