Expose lower stack nodes via pop_until() function
This callback-based API allows the parser to easily visit each interior node of the stack when searching for an error repair. It also is a better abstraction over the stack's DAG implementation than having the public functions for accessing entries and their successor entries.
This commit is contained in:
parent
bc8df9f5c5
commit
4348eb89d4
9 changed files with 417 additions and 295 deletions
|
|
@ -45,10 +45,10 @@ TreeArray ts_tree_array_copy(TreeArray *self) {
|
|||
return result;
|
||||
}
|
||||
|
||||
void ts_tree_array_clear(TreeArray *self) {
|
||||
void ts_tree_array_delete(TreeArray *self) {
|
||||
for (size_t i = 0; i < self->size; i++)
|
||||
ts_tree_release(self->contents[i]);
|
||||
array_clear(self);
|
||||
array_delete(self);
|
||||
}
|
||||
|
||||
TSTree *ts_tree_make_error(TSLength size, TSLength padding, char lookahead_char) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue