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.
This commit is contained in:
Kurtis Rader
2016-04-10 19:08:07 -07:00
parent 59f0261dba
commit 46840ae375
5 changed files with 32 additions and 117 deletions

View File

@@ -3628,11 +3628,11 @@ static void test_new_parser_ll2(void)
const parse_node_tree_t::parse_node_list_t node_list = tree.find_nodes(tree.at(0), tests2[i].type);
if (node_list.size() == 0)
{
err(L"Failed to find node of type '%ls'", token_type_description(tests2[i].type).c_str());
err(L"Failed to find node of type '%ls'", token_type_description(tests2[i].type));
}
else if (node_list.size() > 1)
{
err(L"Found too many nodes of type '%ls'", token_type_description(tests2[i].type).c_str());
err(L"Found too many nodes of type '%ls'", token_type_description(tests2[i].type));
}
}
}