diff options
Diffstat (limited to 'src/parse_tree.cpp')
-rw-r--r-- | src/parse_tree.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parse_tree.cpp b/src/parse_tree.cpp index befa104b..e5666f83 100644 --- a/src/parse_tree.cpp +++ b/src/parse_tree.cpp @@ -335,7 +335,10 @@ static inline parse_token_type_t parse_token_type_from_tokenizer_token( return result; } -/// Helper function for dump_tree. +#if 0 +// Disabled for the 2.2.0 release: https://github.com/fish-shell/fish-shell/issues/1809. + +/// Helper function for parse_dump_tree(). static void dump_tree_recursive(const parse_node_tree_t &nodes, const wcstring &src, node_offset_t node_idx, size_t indent, wcstring *result, size_t *line, node_offset_t *inout_first_node_not_dumped) { @@ -411,6 +414,7 @@ wcstring parse_dump_tree(const parse_node_tree_t &nodes, const wcstring &src) { } return result; } +#endif /// Struct representing elements of the symbol stack, used in the internal state of the LL parser. struct parse_stack_element_t { @@ -467,7 +471,7 @@ class parse_ll_t { // failure (e.g. it is not an unclosed block). bool report_error_for_unclosed_block(); - void dump_stack(void) const; + // void dump_stack(void) const; /// Get the node corresponding to the top element of the stack. parse_node_t &node_for_top_symbol() { @@ -586,6 +590,7 @@ class parse_ll_t { void acquire_output(parse_node_tree_t *output, parse_error_list_t *errors); }; +#if 0 void parse_ll_t::dump_stack(void) const { // Walk backwards from the top, looking for parents. wcstring_list_t lines; @@ -609,6 +614,7 @@ void parse_ll_t::dump_stack(void) const { fprintf(stderr, " %ls\n", lines.at(idx).c_str()); } } +#endif // Give each node a source range equal to the union of the ranges of its children. Terminal nodes // already have source ranges (and no children). Since children always appear after their parents, |