diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-02-26 19:39:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 19:39:56 +0100 |
commit | 78ec95ce7dc070899caf2b35f7058ba466fe7073 (patch) | |
tree | c18b41e10c87af838fddda94eb4e8f65ca671586 /src/tree_sitter/language.h | |
parent | 96059d72e539c0a23c1f7a24290f35247ff01749 (diff) | |
parent | 3ce9b05653a71efe2eeaeca6b6132d1227c367b7 (diff) | |
download | rneovim-78ec95ce7dc070899caf2b35f7058ba466fe7073.tar.gz rneovim-78ec95ce7dc070899caf2b35f7058ba466fe7073.tar.bz2 rneovim-78ec95ce7dc070899caf2b35f7058ba466fe7073.zip |
Merge pull request #11946 from bfredl/ts-sync
treesitter: update vendored tree-sitter runtime
Diffstat (limited to 'src/tree_sitter/language.h')
-rw-r--r-- | src/tree_sitter/language.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/tree_sitter/language.h b/src/tree_sitter/language.h index d7e17c3d70..f908b4593a 100644 --- a/src/tree_sitter/language.h +++ b/src/tree_sitter/language.h @@ -29,10 +29,12 @@ static inline bool ts_language_is_symbol_external(const TSLanguage *self, TSSymb return 0 < symbol && symbol < self->external_token_count + 1; } -static inline const TSParseAction *ts_language_actions(const TSLanguage *self, - TSStateId state, - TSSymbol symbol, - uint32_t *count) { +static inline const TSParseAction *ts_language_actions( + const TSLanguage *self, + TSStateId state, + TSSymbol symbol, + uint32_t *count +) { TableEntry entry; ts_language_table_entry(self, state, symbol, &entry); *count = entry.action_count; @@ -90,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; |