From d7cb460833e6dde3e3b958b993eee3eee4ae3bf0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 29 Sep 2022 09:46:58 +0200 Subject: Fix variable append logic in script --- libbuild2/script/parser.hxx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'libbuild2/script/parser.hxx') diff --git a/libbuild2/script/parser.hxx b/libbuild2/script/parser.hxx index 0f276e1..3a4c46f 100644 --- a/libbuild2/script/parser.hxx +++ b/libbuild2/script/parser.hxx @@ -42,11 +42,6 @@ namespace build2 using build2::parser::apply_value_attributes; - // The variable is optional and is only used for diagnostics. - // - void - append_value (const variable*, value& lhs, value&& rhs, const location&); - // Return true if a command line element needs to be re-lexed. // // Specifically, it needs to be re-lexed if it contains any of the @@ -167,10 +162,9 @@ namespace build2 // builtin). For unsuccessful termination the failed exception is // thrown. // - using exec_assign_function = void (const variable&, - value&&, - token_type kind, - const location&); + using exec_set_function = void (const variable&, + token&, token_type&, + const location&); using exec_cmd_function = void (token&, token_type&, const iteration_index*, size_t li, @@ -181,6 +175,10 @@ namespace build2 const iteration_index*, size_t li, const location&); + using exec_for_function = void (const variable&, + value&&, + const location&); + // If a parser implementation doesn't pre-enter variables into a pool // during the pre-parsing phase, then they are entered during the // execution phase and so the variable pool must be provided. Note that @@ -188,9 +186,10 @@ namespace build2 // bool exec_lines (lines::const_iterator b, lines::const_iterator e, - const function&, + const function&, const function&, const function&, + const function&, const iteration_index*, size_t& li, variable_pool* = nullptr); -- cgit v1.1