Add a benchmark command
This command measures the speed of parsing each grammar's examples. It also uses each grammar to parse all of the *other* grammars' examples in order to measure error recovery performance with fairly large files.
This commit is contained in:
parent
298228d8de
commit
17bc3dfaf7
11 changed files with 191 additions and 11 deletions
|
|
@ -310,6 +310,10 @@ bool ts_node_has_changes(TSNode self) {
|
|||
return ts_node__tree(self)->has_changes;
|
||||
}
|
||||
|
||||
bool ts_node_has_error(TSNode self) {
|
||||
return ts_node__tree(self)->error_cost > 0;
|
||||
}
|
||||
|
||||
TSNode ts_node_parent(TSNode self) {
|
||||
TSNode result = self;
|
||||
uint32_t index;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue