Convert run_begin_statement to tnode_t

This commit is contained in:
ridiculousfish 2018-01-15 10:58:03 -08:00
parent 6f99c9a904
commit 7a3d5ddeae
2 changed files with 3 additions and 6 deletions

View file

@ -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<g::begin_header> header, tnode_t<g::job_list> contents) {
// Basic begin/end block. Push a scope block, run jobs, pop it
scope_block_t *sb = parser->push_block<scope_block_t>(BEGIN);
parse_execution_result_t ret = run_job_list(contents, sb);

View file

@ -103,8 +103,8 @@ class parse_execution_context_t {
tnode_t<grammar::job_list> contents);
parse_execution_result_t run_function_statement(tnode_t<grammar::function_header> header,
tnode_t<grammar::end_command> 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<grammar::begin_header> header,
tnode_t<grammar::job_list> contents);
enum globspec_t { failglob, nullglob };
parse_execution_result_t determine_arguments(const parse_node_t &parent,