aboutsummaryrefslogtreecommitdiff
path: root/src/tree_sitter/language.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-02-25 13:03:40 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2020-02-25 22:20:23 +0100
commit3ce9b05653a71efe2eeaeca6b6132d1227c367b7 (patch)
treec18b41e10c87af838fddda94eb4e8f65ca671586 /src/tree_sitter/language.h
parent96059d72e539c0a23c1f7a24290f35247ff01749 (diff)
downloadrneovim-3ce9b05653a71efe2eeaeca6b6132d1227c367b7.tar.gz
rneovim-3ce9b05653a71efe2eeaeca6b6132d1227c367b7.tar.bz2
rneovim-3ce9b05653a71efe2eeaeca6b6132d1227c367b7.zip
treesitter: update vendored tree-sitter runtime
tree-sitter/tree-sitter commit 6cb8d24de2d99c4c50c9a0fd1e719ca5b3abc87f Included files are: lib/include/tree-sitter/*.h lib/src/*.[ch] lib/src/unicode/* LICENSE
Diffstat (limited to 'src/tree_sitter/language.h')
-rw-r--r--src/tree_sitter/language.h14
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;