feat(ts): include parser ABI version in checkhealth

This commit is contained in:
Thomas Vigouroux
2021-04-01 17:07:46 +02:00
parent 86ced59a6a
commit e8bc3d717e
3 changed files with 9 additions and 2 deletions

View File

@@ -21,7 +21,9 @@ function M.check_health()
if not is_loadable then
report_error(string.format("Impossible to load parser for %s: %s", parsername, ret))
elseif ret then
report_ok(string.format("Loaded parser for %s", parsername))
local lang = ts.language.inspect_language(parsername)
report_ok(string.format("Loaded parser for %s: ABI version %d",
parsername, lang._abi_version))
else
report_error(string.format("Unable to load parser for %s", parsername))
end