Improve parser runtime specs
This commit is contained in:
parent
8a317f6918
commit
432e97e063
5 changed files with 119 additions and 96 deletions
|
|
@ -32,9 +32,7 @@ TSTree * TSDocumentTree(const TSDocument *document) {
|
|||
const char * TSDocumentToString(const TSDocument *document) {
|
||||
if (document->error.type != TSParseErrorTypeNone) {
|
||||
return TSParseErrorToString(&document->error, document->text, document->symbol_names);
|
||||
} else if (document->tree) {
|
||||
return TSTreeToString(document->tree, document->symbol_names);
|
||||
} else {
|
||||
return "#<null tree>";
|
||||
return TSTreeToString(document->tree, document->symbol_names);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue