diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-05-28 22:28:26 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-05-29 22:24:29 -0700 |
commit | 5bf1b0e5f500b6b99a866da32dd9002219cac6d6 (patch) | |
tree | 4622863e7f28ad7f840d6a7096057286aee4e750 /src/parse_tree.cpp | |
parent | 3d19b549c8d9fc77597d0de95260e90f5dda2dae (diff) |
fix random lint issues
This only eliminates errors reported by `make lint`. It shouldn't cause any
functional changes.
This change does remove several functions that are unused. It also removes the
`desc_arr` variable which is both unused and out of date with reality.
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, |