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

@@ -3976,8 +3976,7 @@ int builtin_parse(parser_t &parser, wchar_t **argv)
const wcstring src = str2wcstring(&txt.at(0), txt.size());
parse_node_tree_t parse_tree;
parse_error_list_t errors;
parse_t parser;
bool success = parser.parse(src, parse_flag_none, &parse_tree, &errors, true);
bool success = parse_t::parse(src, parse_flag_none, &parse_tree, &errors, true);
if (! success)
{
stdout_buffer.append(L"Parsing failed:\n");