Remove the concept of fragile reductions
They were a vestige of when Tree-sitter did sentential form-based incremental parsing (as opposed to simply state matching). This was elegant but not compatible with GLR as far as I could tell.
This commit is contained in:
parent
07fa3eb386
commit
52087de4f0
7 changed files with 20 additions and 66 deletions
|
|
@ -1119,11 +1119,12 @@ static void parser__advance(Parser *self, StackVersion version, ReusableNode *re
|
|||
}
|
||||
|
||||
case TSParseActionTypeReduce: {
|
||||
bool is_fragile = table_entry.action_count > 1;
|
||||
LOG("reduce sym:%s, child_count:%u", SYM_NAME(action.params.symbol), action.params.child_count);
|
||||
StackPopResult reduction = parser__reduce(
|
||||
self, version, action.params.symbol, action.params.child_count,
|
||||
action.params.dynamic_precedence, action.params.alias_sequence_id,
|
||||
action.params.fragile
|
||||
is_fragile
|
||||
);
|
||||
StackSlice slice = *array_front(&reduction.slices);
|
||||
last_reduction_version = slice.version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue