diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-29 14:45:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-29 14:45:22 +0200 |
commit | e19b3b03ec3ba22717cc05854c62ed78c69bb1a4 (patch) | |
tree | f99a0a544aced81ae07b1d5926ff9871d648f20d /libbuild2/parser.hxx | |
parent | 27547e341f32782ad2d7fd998dde1cb04f4bf1db (diff) |
Add support for is-else, switch in ad hoc recipes
Diffstat (limited to 'libbuild2/parser.hxx')
-rw-r--r-- | libbuild2/parser.hxx | 17 |
1 files changed, 16 insertions, 1 deletions
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 ( + token&, token_type&, bool, const string&)>&); + + void parse_switch (token&, token_type&); void + parse_switch (token&, token_type&, + bool, + const function<void ( + token&, token_type&, bool, const string&)>&); + + 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 `[` |