feat!: introduce parser introspection via the repo's Semantic Version baked in

This commit is contained in:
Amaan Qureshi 2024-02-12 02:27:17 -05:00
parent b66b1a7a92
commit 2c192fa038
No known key found for this signature in database
GPG key ID: E67890ADC4227273
15 changed files with 1862 additions and 2156 deletions

View file

@ -1875,8 +1875,8 @@ bool ts_parser_set_language(TSParser *self, const TSLanguage *language) {
if (language) {
if (
language->version > TREE_SITTER_LANGUAGE_VERSION ||
language->version < TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION
language->abi_version > TREE_SITTER_LANGUAGE_VERSION ||
language->abi_version < TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION
) return false;
if (ts_language_is_wasm(language)) {