From e19b3b03ec3ba22717cc05854c62ed78c69bb1a4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 29 May 2020 14:45:22 +0200 Subject: Add support for is-else, switch in ad hoc recipes --- libbuild2/parser.hxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libbuild2/parser.hxx') diff --git a/libbuild2/parser.hxx b/libbuild2/parser.hxx index 2f67c31..66a985a 100644 --- a/libbuild2/parser.hxx +++ b/libbuild2/parser.hxx @@ -107,6 +107,9 @@ namespace build2 parse_clause (token&, token_type&, bool one = false); void + parse_clause_block (token& t, token_type& tt, bool, const string&); + + void parse_variable_block (token&, token_type&, const target_type* = nullptr, string = string ()); @@ -179,9 +182,21 @@ namespace build2 parse_if_else (token&, token_type&); void + parse_if_else (token&, token_type&, + bool, + const function&); + + void parse_switch (token&, token_type&); void + parse_switch (token&, token_type&, + bool, + const function&); + + void parse_for (token&, token_type&); void @@ -261,7 +276,7 @@ namespace build2 location loc; // Start location. explicit - attributes (location l): loc (move (l)) {} + attributes (location l = {}): loc (move (l)) {} }; // Push a new entry into the attributes_ stack. If the next token is `[` -- cgit v1.1