Always resolve ambiguities immediately
No more ambiguity nodes. Also, when merging parse stacks, merge their successors if needed.
This commit is contained in:
parent
8c5c695f5a
commit
0b1d70db34
18 changed files with 123 additions and 86 deletions
|
|
@ -303,9 +303,13 @@ static TSTree *finish(TSParser *parser) {
|
|||
* Public
|
||||
*/
|
||||
|
||||
TSTree * ts_parser_select_tree(void *data, TSTree *left, TSTree *right) {
|
||||
return left;
|
||||
}
|
||||
|
||||
TSParser ts_parser_make() {
|
||||
return (TSParser) { .lexer = ts_lexer_make(),
|
||||
.stack = ts_parse_stack_new(),
|
||||
.stack = ts_parse_stack_new((TreeSelectionCallback) {NULL, ts_parser_select_tree}),
|
||||
.right_stack = ts_stack_make() };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue