Languages
NAME
TreeSitter::Native::Languages - the nine bundled grammars, by name
SYNOPSIS
use TreeSitter::Native::Languages;
say languages; # (c cpp go java javascript python
# rust tsx typescript)
say language-abi('python'); # 15
my $lang = language('rust'); # a TSLanguage, ready for a Parser
# The grammar authors' own queries, vendored at the pinned tag.
my $tags = tags-query('go');
my $hl = highlights-query('go');
my $loc = query-source('typescript', 'locals');
DESCRIPTION
Nine grammars are linked into the shared library β there is no dynamic
grammar loading, and no tree-sitter-cli at runtime. This module is
the map from a name to the compiled grammar, and from a name to the
.scm query files that grammar ships.
The queries are vendored in this distribution's resources/, copied
verbatim from each grammar repository at the tag pinned in
SOURCE_PINS. They are MIT-licensed by their authors; see
resources/licenses/. Reading them needs no native library at all,
which is what makes the query surface testable offline.
There is deliberately no Raku grammar: no usable tree-sitter grammar for Raku exists at the time of writing. That is a limitation of the ecosystem, not an omission here.