Clean up ts_language_next_state

This commit is contained in:
Max Brunsfeld 2020-02-07 11:06:33 -08:00
parent a1c3de1b99
commit 096014cb3e

View file

@ -92,8 +92,8 @@ static inline TSStateId ts_language_next_state(const TSLanguage *self,
const TSParseAction *actions = ts_language_actions(self, state, symbol, &count);
if (count > 0) {
TSParseAction action = actions[count - 1];
if (action.type == TSParseActionTypeShift || action.type == TSParseActionTypeRecover) {
return action.params.state;
if (action.type == TSParseActionTypeShift) {
return action.params.extra ? state : action.params.state;
}
}
return 0;