From 7ef9e4d8e7c37123dbcd6c2fc996e59f617c700a Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 5 Apr 2014 16:09:02 -0700 Subject: [PATCH] Remove an unnecessary parse pass in highlight.cpp (oops) --- highlight.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/highlight.cpp b/highlight.cpp index 14672bf05..8145e5f30 100644 --- a/highlight.cpp +++ b/highlight.cpp @@ -950,7 +950,6 @@ public: highlighter_t(const wcstring &str, size_t pos, const env_vars_snapshot_t &ev, const wcstring &wd, bool can_do_io) : buff(str), cursor_pos(pos), vars(ev), io_ok(can_do_io), working_directory(wd), color_array(str.size()) { /* Parse the tree */ - this->parse_tree.clear(); parse_tree_from_string(buff, parse_flag_continue_after_error | parse_flag_include_comments, &this->parse_tree, NULL); } @@ -1309,10 +1308,6 @@ const highlighter_t::color_array_t & highlighter_t::highlight() /* Start out at zero */ std::fill(this->color_array.begin(), this->color_array.end(), 0); - /* Parse the buffer */ - parse_node_tree_t parse_tree; - parse_tree_from_string(buff, parse_flag_continue_after_error | parse_flag_include_comments, &parse_tree, NULL); - #if 0 const wcstring dump = parse_dump_tree(parse_tree, buff); fprintf(stderr, "%ls\n", dump.c_str());