aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parse_productions.cpp
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-04-10 19:08:07 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-04-10 19:29:23 -0700
commit46840ae3753bb48fd6042b6e140ae1271dc84fdc (patch)
tree121f9a99d635bca06c197734fd47e90f00a440b4 /src/parse_productions.cpp
parent59f0261dba993a5d632ce6e9963270a582d162e6 (diff)
another wcstring to wchar_t * change
In keeping with the change made by @ridiculousfish earlier today modify the `keyword_description()` function to return a const wchar_t pointer. Also, simplify the `token_type_description()` function to use the recently introduced mapping array. This changes the wording of many of the token type descriptions. However, I can't see this as being a problem since the original descriptions (e.g., "token_redirection") are no clearer to someone not acquainted with the implementation.
Diffstat (limited to 'src/parse_productions.cpp')
-rw-r--r--src/parse_productions.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parse_productions.cpp b/src/parse_productions.cpp
index 1a44ff48..6ec8e56a 100644
--- a/src/parse_productions.cpp
+++ b/src/parse_productions.cpp
@@ -409,7 +409,7 @@ const production_t *parse_productions::production_for_token(parse_token_type_t n
const bool log_it = false;
if (log_it)
{
- fprintf(stderr, "Resolving production for %ls with input token <%ls>\n", token_type_description(node_type).c_str(), input1.describe().c_str());
+ fprintf(stderr, "Resolving production for %ls with input token <%ls>\n", token_type_description(node_type), input1.describe().c_str());
}
/* Fetch the function to resolve the list of productions */
@@ -452,14 +452,14 @@ const production_t *parse_productions::production_for_token(parse_token_type_t n
case parse_token_type_background:
case parse_token_type_end:
case parse_token_type_terminate:
- fprintf(stderr, "Terminal token type %ls passed to %s\n", token_type_description(node_type).c_str(), __FUNCTION__);
+ fprintf(stderr, "Terminal token type %ls passed to %s\n", token_type_description(node_type), __FUNCTION__);
PARSER_DIE();
break;
case parse_special_type_parse_error:
case parse_special_type_tokenizer_error:
case parse_special_type_comment:
- fprintf(stderr, "Special type %ls passed to %s\n", token_type_description(node_type).c_str(), __FUNCTION__);
+ fprintf(stderr, "Special type %ls passed to %s\n", token_type_description(node_type), __FUNCTION__);
PARSER_DIE();
break;
@@ -477,7 +477,7 @@ const production_t *parse_productions::production_for_token(parse_token_type_t n
{
if (log_it)
{
- fprintf(stderr, "Node type '%ls' has no production for input '%ls' (in %s)\n", token_type_description(node_type).c_str(), input1.describe().c_str(), __FUNCTION__);
+ fprintf(stderr, "Node type '%ls' has no production for input '%ls' (in %s)\n", token_type_description(node_type), input1.describe().c_str(), __FUNCTION__);
}
}