aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/fish_indent.cpp2
-rw-r--r--src/parse_constants.h2
-rw-r--r--src/parse_tree.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/fish_indent.cpp b/src/fish_indent.cpp
index 0e31f28e..d2e23943 100644
--- a/src/fish_indent.cpp
+++ b/src/fish_indent.cpp
@@ -104,7 +104,7 @@ static void dump_node(indent_t node_indent, const parse_node_t &node, const wcst
}
fwprintf(stderr, L"{off %4d, len %4d, indent %2u, %ls} [%ls|%ls|%ls]\n",
node.source_start, node.source_length, node_indent,
- parser_token_types[node.type].c_str(), prevc_str, source.substr(node.source_start,
+ parser_token_types[node.type], prevc_str, source.substr(node.source_start,
node.source_length).c_str(), nextc_str);
}
diff --git a/src/parse_constants.h b/src/parse_constants.h
index afc88c6c..03dffd28 100644
--- a/src/parse_constants.h
+++ b/src/parse_constants.h
@@ -83,7 +83,7 @@ enum parse_token_type_t
LAST_PARSE_TOKEN_TYPE = parse_token_type_end
} __packed;
// Array of strings corresponding to the enums above instantiated in parse_tree.cpp.
-extern wcstring parser_token_types[];
+extern const wchar_t * const parser_token_types[];
/* These must be maintained in sorted order (except for none, which isn't a keyword). This enables us to do binary search. */
enum parse_keyword_t
diff --git a/src/parse_tree.cpp b/src/parse_tree.cpp
index cdaec9ef..ca6e310b 100644
--- a/src/parse_tree.cpp
+++ b/src/parse_tree.cpp
@@ -17,7 +17,7 @@
#include <algorithm>
// This array provides strings for each symbol in enum parse_token_type_t in parse_constants.h.
-wcstring parser_token_types[] = {
+const wchar_t * const parser_token_types[] = {
L"token_type_invalid",
L"symbol_job_list",
L"symbol_job",