Fix parser position in parse error messages
This commit is contained in:
parent
a21c42ca85
commit
4cacdcba70
2 changed files with 3 additions and 1 deletions
|
|
@ -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 += string(" '") + error->expected_inputs[i] + "'";
|
||||
result += error->expected_inputs[i];
|
||||
|
||||
char *stuff = (char *)malloc(result.size() * sizeof(char));
|
||||
strcpy(stuff, result.c_str());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue