aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_tree.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-12 13:33:35 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-12 13:33:35 -0800
commit89069fdaa4fff2f8b703fef0be260eb4d4c2ed9b (patch)
tree89d1d66d214ae3f149c8e152b1fd7cd204395670 /parse_tree.cpp
parent1130e4782de6378a7ad2cbb39cfb1626d7233fe8 (diff)
Miscellaneous minor fixes based on cppcheck static analyzer
Diffstat (limited to 'parse_tree.cpp')
-rw-r--r--parse_tree.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/parse_tree.cpp b/parse_tree.cpp
index 5134379d..ee401a45 100644
--- a/parse_tree.cpp
+++ b/parse_tree.cpp
@@ -765,7 +765,7 @@ void parse_ll_t::parse_error(const wchar_t *expected, parse_token_t token)
fatal_errored = true;
if (this->should_generate_error_messages)
{
- wcstring desc = token_type_description(token.type);
+ wcstring desc = token.user_presentable_description();
this->parse_error(token, parse_error_generic, L"Expected a %ls, instead got a token of type %ls", expected, desc.c_str());
}
}
@@ -881,8 +881,7 @@ bool parse_ll_t::top_node_handle_terminal_types(parse_token_t token)
}
else
{
- const wcstring expected = token_type_description(stack_top.type);
- const wcstring actual = token_type_description(token.type);
+ const wcstring expected = stack_top.user_presentable_description();
this->parse_error(expected.c_str(), token);
}
}