diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-10 16:33:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-10 16:33:12 +0200 |
commit | a084c6650036db9f2a8cd69e31492c5dae237793 (patch) | |
tree | ba3e34f6e85ae9e0073476b0dc46956c51039189 /build2/test/script/parser | |
parent | f1cbb7c9d5c750366fa1918a53d0682f0633b1d9 (diff) |
Implement scope-if in testscript
Diffstat (limited to 'build2/test/script/parser')
-rw-r--r-- | build2/test/script/parser | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/build2/test/script/parser b/build2/test/script/parser index a543edf..23a52d4 100644 --- a/build2/test/script/parser +++ b/build2/test/script/parser @@ -37,7 +37,8 @@ namespace build2 void parse (script& s, runner& r) { - parse (s, s, r); + if (!s.empty ()) + parse (s, s, r); } // Recursive descent parser. @@ -51,6 +52,9 @@ namespace build2 void parse (scope&, script&, runner&); + bool + demote_group_scope (unique_ptr<scope>&); + token pre_parse_scope_body (); @@ -75,11 +79,24 @@ namespace build2 void parse_lines (lines::iterator, lines::iterator, size_t&, bool); + command_expr + parse_command_expr (token&, token_type&); + bool pre_parse_if_else (token&, token_type&, optional<description>&, lines&); + bool + pre_parse_if_else_scope (token&, token_type&, + optional<description>&, + lines&); + + bool + pre_parse_if_else_command (token&, token_type&, + optional<description>&, + lines&); + void parse_directive_line (token&, token_type&); |