Manage lookahead symbol correctly after a reduction

This commit is contained in:
Max Brunsfeld 2014-01-22 23:04:29 -08:00
parent e174b89133
commit 8a317f6918
3 changed files with 22 additions and 5 deletions

View file

@ -19,7 +19,7 @@ const char * TSParseErrorToString(const TSParseError *error, const char *input_s
result += "Expected: ";
for (int i = 0; i < error->expected_input_count; i++)
result += error->expected_inputs[i];
result += string(error->expected_inputs[i]) + " ";
char *stuff = (char *)malloc(result.size() * sizeof(char));
strcpy(stuff, result.c_str());