Make parse_t::parse a static method so we don't have to create lots of

useless parse_t objects
This commit is contained in:
ridiculousfish
2013-10-12 01:17:55 -07:00
parent 58447c147f
commit 5490f54d00
5 changed files with 16 additions and 13 deletions

View File

@@ -664,8 +664,7 @@ bool reader_expand_abbreviation_in_command(const wcstring &cmdline, size_t curso
/* Parse this subcmd */
parse_node_tree_t parse_tree;
parse_t parser;
parser.parse(subcmd, parse_flag_continue_after_error | parse_flag_accept_incomplete_tokens, &parse_tree, NULL);
parse_t::parse(subcmd, parse_flag_continue_after_error | parse_flag_accept_incomplete_tokens, &parse_tree, NULL);
/* Look for plain statements where the cursor is at the end of the command */
const parse_node_t *matching_cmd_node = NULL;