Store parse states with few lookahead symbols in a more compact way
This commit is contained in:
parent
48a883c1d4
commit
09a2755399
7 changed files with 135 additions and 11 deletions
|
|
@ -11,7 +11,7 @@ void ts_language_table_entry(const TSLanguage *self, TSStateId state,
|
|||
result->actions = NULL;
|
||||
} else {
|
||||
assert(symbol < self->token_count);
|
||||
uint32_t action_index = self->parse_table[state * self->symbol_count + symbol];
|
||||
uint32_t action_index = ts_language_lookup(self, state, symbol);
|
||||
const TSParseActionEntry *entry = &self->parse_actions[action_index];
|
||||
result->action_count = entry->count;
|
||||
result->is_reusable = entry->reusable;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue