From 45c9e3b0f176bbd5e487b95c4f20e6eec00ea7ca Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 28 Jun 2020 16:53:58 -0700 Subject: [PATCH] parsed_source_ref to always make a job_list Removed an unnecessary param in preparation for more changes. --- src/parse_tree.cpp | 6 +++--- src/parse_tree.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/parse_tree.cpp b/src/parse_tree.cpp index 1373b1229..ee0281bbf 100644 --- a/src/parse_tree.cpp +++ b/src/parse_tree.cpp @@ -1215,10 +1215,10 @@ const parse_node_t *parse_node_tree_t::get_child(const parse_node_t &parent, nod return result; } -parsed_source_ref_t parse_source(wcstring src, parse_tree_flags_t flags, parse_error_list_t *errors, - parse_token_type_t goal) { +parsed_source_ref_t parse_source(wcstring src, parse_tree_flags_t flags, + parse_error_list_t *errors) { parse_node_tree_t tree; - if (!parse_tree_from_string(src, flags, &tree, errors, goal)) return {}; + if (!parse_tree_from_string(src, flags, &tree, errors, symbol_job_list)) return {}; return std::make_shared(std::move(src), std::move(tree)); } diff --git a/src/parse_tree.h b/src/parse_tree.h index 61082d227..3e98104fa 100644 --- a/src/parse_tree.h +++ b/src/parse_tree.h @@ -225,8 +225,8 @@ struct parsed_source_t { }; /// Return a shared pointer to parsed_source_t, or null on failure. using parsed_source_ref_t = std::shared_ptr; -parsed_source_ref_t parse_source(wcstring src, parse_tree_flags_t flags, parse_error_list_t *errors, - parse_token_type_t goal = symbol_job_list); +parsed_source_ref_t parse_source(wcstring src, parse_tree_flags_t flags, + parse_error_list_t *errors); /// Error message for improper use of the exec builtin. #define EXEC_ERR_MSG _(L"The '%ls' command can not be used in a pipeline")