diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-10-12 18:17:03 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-10-12 18:17:03 -0700 |
commit | ddf98661e4f16f75bb3deea26ec0c1e3bc651263 (patch) | |
tree | d811a53831ba23bfb81254d61798ba459f93357c /highlight.cpp | |
parent | cbd8a27a6d1ec705032486851203f8c4d1b4f56f (diff) |
Adopt new parser in tab completions
Diffstat (limited to 'highlight.cpp')
-rw-r--r-- | highlight.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/highlight.cpp b/highlight.cpp index ffd5953c..c4ad7d92 100644 --- a/highlight.cpp +++ b/highlight.cpp @@ -713,8 +713,7 @@ static bool autosuggest_parse_command(const wcstring &buff, wcstring *out_expand /* Parse the buffer */ parse_node_tree_t parse_tree; - parse_t parser; - parser.parse(buff, parse_flag_continue_after_error | parse_flag_accept_incomplete_tokens, &parse_tree, NULL); + parse_t::parse(buff, parse_flag_continue_after_error | parse_flag_accept_incomplete_tokens, &parse_tree, NULL); /* Find the last statement */ const parse_node_t *last_statement = parse_tree.find_last_node_of_type(symbol_plain_statement, NULL); @@ -1709,8 +1708,7 @@ class highlighter_t { /* Parse the tree */ this->parse_tree.clear(); - parse_t parser; - parser.parse(buff, parse_flag_continue_after_error | parse_flag_include_comments, &this->parse_tree, NULL); + parse_t::parse(buff, parse_flag_continue_after_error | parse_flag_include_comments, &this->parse_tree, NULL); } /* Perform highlighting, returning an array of colors */ @@ -1920,8 +1918,7 @@ const highlighter_t::color_array_t & highlighter_t::highlight() /* Parse the buffer */ parse_node_tree_t parse_tree; - parse_t parser; - parser.parse(buff, parse_flag_continue_after_error | parse_flag_include_comments, &parse_tree, NULL); + parse_t::parse(buff, parse_flag_continue_after_error | parse_flag_include_comments, &parse_tree, NULL); #if 0 const wcstring dump = parse_dump_tree(parse_tree, buff); |