From cbd3fa6b01bab709d0b6f5277a984685d8c45888 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 27 Feb 2016 18:25:58 -0800 Subject: Eliminate parser_type_t It was never fully implemented and wasn't used for anything --- src/parser.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 5813bb12..325b053d 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -162,8 +162,7 @@ static wcstring user_presentable_path(const wcstring &path) } -parser_t::parser_t(enum parser_type_t type, bool errors) : - parser_type(type), +parser_t::parser_t(bool errors) : show_errors(errors), cancellation_requested(false), is_within_fish_initialization(false) @@ -177,7 +176,7 @@ parser_t &parser_t::principal_parser(void) { ASSERT_IS_NOT_FORKED_CHILD(); ASSERT_IS_MAIN_THREAD(); - static parser_t parser(PARSER_TYPE_GENERAL, true); + static parser_t parser(true); if (! s_principal_parser) { s_principal_parser = &parser; @@ -467,20 +466,11 @@ void parser_t::emit_profiling(const char *path) const } } -void parser_t::expand_argument_list(const wcstring &arg_list_src, std::vector *output_arg_list) +void parser_t::expand_argument_list(const wcstring &arg_list_src, expand_flags_t eflags, std::vector *output_arg_list) { assert(output_arg_list != NULL); - expand_flags_t eflags = 0; if (! show_errors) eflags |= EXPAND_NO_DESCRIPTIONS; - if (this->parser_type != PARSER_TYPE_GENERAL) - eflags |= EXPAND_SKIP_CMDSUBST; - - /* Suppress calling proc_push_interactive off of the main thread. */ - if (this->parser_type == PARSER_TYPE_GENERAL) - { - proc_push_interactive(0); - } /* Parse the string as an argument list */ parse_node_tree_t tree; @@ -509,11 +499,6 @@ void parser_t::expand_argument_list(const wcstring &arg_list_src, std::vectorparser_type == PARSER_TYPE_GENERAL) - { - proc_pop_interactive(); - } } wcstring parser_t::stack_trace() const -- cgit v1.2.3