Add several bindings for Language

This commit is contained in:
hvithrafn 2021-02-01 11:10:19 -07:00
parent 460ce72312
commit 752372ee09
5 changed files with 145 additions and 0 deletions

View file

@ -184,6 +184,20 @@ TSTree *ts_parser_parse_wasm(
return ts_parser_parse(self, old_tree, input);
}
/**********************/
/* Section - Language */
/**********************/
int ts_language_type_is_named_wasm(const TSLanguage *self, TSSymbol typeId) {
const TSSymbolType symbolType = ts_language_symbol_type(self, typeId);
return symbolType == TSSymbolTypeRegular;
}
int ts_language_type_is_visible_wasm(const TSLanguage *self, TSSymbol typeId) {
const TSSymbolType symbolType = ts_language_symbol_type(self, typeId);
return symbolType <= TSSymbolTypeAnonymous;
}
/******************/
/* Section - Tree */
/******************/