Remove some unused parameters

This commit is contained in:
ridiculousfish 2018-01-20 14:05:34 -08:00
parent c53ee263d8
commit 852cf183a6
3 changed files with 5 additions and 8 deletions

View File

@ -304,8 +304,7 @@ parse_execution_result_t parse_execution_context_t::run_if_statement(
return result;
}
parse_execution_result_t parse_execution_context_t::run_begin_statement(
tnode_t<g::begin_header> header, tnode_t<g::job_list> contents) {
parse_execution_result_t parse_execution_context_t::run_begin_statement(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);
@ -374,7 +373,7 @@ parse_execution_result_t parse_execution_context_t::run_block_statement(
tnode_t<g::end_command> func_end = statement.child<2>();
ret = run_function_statement(header, func_end);
} else if (auto header = bheader.try_get_child<g::begin_header, 0>()) {
ret = run_begin_statement(header, contents);
ret = run_begin_statement(contents);
} else {
debug(0, L"Unexpected block header: %ls\n", bheader.node()->describe().c_str());
PARSER_DIE();

View File

@ -103,8 +103,7 @@ 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(tnode_t<grammar::begin_header> header,
tnode_t<grammar::job_list> contents);
parse_execution_result_t run_begin_statement(tnode_t<grammar::job_list> contents);
enum globspec_t { failglob, nullglob };
using argument_node_list_t = std::vector<tnode_t<grammar::argument>>;

View File

@ -1037,8 +1037,7 @@ parser_test_error_bits_t parse_util_detect_errors_in_argument(tnode_t<grammar::a
}
/// Given that the job given by node should be backgrounded, return true if we detect any errors.
static bool detect_errors_in_backgrounded_job(const parse_node_tree_t &node_tree,
tnode_t<grammar::job> job,
static bool detect_errors_in_backgrounded_job(tnode_t<grammar::job> job,
parse_error_list_t *parse_errors) {
auto source_range = job.source_range();
if (!source_range) return false;
@ -1164,7 +1163,7 @@ parser_test_error_bits_t parse_util_detect_errors(const wcstring &buff_src,
// If it's not a background job, nothing to do.
auto job = tnode_t<grammar::job>{&node_tree, &node};
if (job_node_is_background(job)) {
errored |= detect_errors_in_backgrounded_job(node_tree, job, &parse_errors);
errored |= detect_errors_in_backgrounded_job(job, &parse_errors);
}
} else if (node.type == symbol_plain_statement) {
using namespace grammar;