diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp index 921faf829..f05b6cecf 100644 --- a/src/parse_execution.cpp +++ b/src/parse_execution.cpp @@ -329,10 +329,7 @@ parse_execution_result_t parse_execution_context_t::run_if_statement( } parse_execution_result_t parse_execution_context_t::run_begin_statement( - const parse_node_t &header, const parse_node_t &contents) { - assert(header.type == symbol_begin_header); - assert(contents.type == symbol_job_list); - + tnode_t header, tnode_t contents) { // Basic begin/end block. Push a scope block, run jobs, pop it scope_block_t *sb = parser->push_block(BEGIN); parse_execution_result_t ret = run_job_list(contents, sb); diff --git a/src/parse_execution.h b/src/parse_execution.h index 5ef894d03..ea0ce0791 100644 --- a/src/parse_execution.h +++ b/src/parse_execution.h @@ -103,8 +103,8 @@ class parse_execution_context_t { tnode_t contents); parse_execution_result_t run_function_statement(tnode_t header, tnode_t block_end); - parse_execution_result_t run_begin_statement(const parse_node_t &header, - const parse_node_t &contents); + parse_execution_result_t run_begin_statement(tnode_t header, + tnode_t contents); enum globspec_t { failglob, nullglob }; parse_execution_result_t determine_arguments(const parse_node_t &parent,