Tweak parse log messages
This commit is contained in:
parent
09b019c530
commit
df09f37a6c
2 changed files with 40 additions and 36 deletions
|
|
@ -399,8 +399,10 @@ static size_t ts_tree__write_to_string(const TSTree *self,
|
|||
cursor += snprintf(*writer, limit, " ");
|
||||
|
||||
if (visible) {
|
||||
if (self->symbol == ts_builtin_sym_error && self->child_count == 0 && self->size.chars > 0) {
|
||||
cursor += snprintf(*writer, limit, "(UNEXPECTED '%c'", self->lookahead_char);
|
||||
if (self->symbol == ts_builtin_sym_error && self->child_count == 0 &&
|
||||
self->size.chars > 0) {
|
||||
cursor +=
|
||||
snprintf(*writer, limit, "(UNEXPECTED '%c'", self->lookahead_char);
|
||||
} else {
|
||||
cursor += snprintf(*writer, limit, "(%s",
|
||||
ts_language_symbol_name(language, self->symbol));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue