Prolog grammar for Tree-sitter. The "References" section lists the various extensions that currently have their own grammar besides ISO Prolog.
Feel free to contribute with new ones! It is super easy, as you can just extend
an existing one. See .woodpecker.yml
for the current version of Tree-sitter
we are testing against.
The project uses pnpm as its package manager. Files package.json
,
tree-sitter.json
, and pnpm-lock.yaml
can be found in the root folder.
A grammar.js
file for a Prolog extension xxx
is located at
grammars/xxx/grammar.js
. They are formatted using dprint, according to
grammars/dprint.json
.
Parser sources for a Prolog extension xxx
are located at grammars/xxx/src/
.
If you are not using the generate
pnpm script and are manually invoking the
tree-sitter generate
command instead, make sure your current directory is
grammars/xxx/
.
If a .scm
file does not need modifications between two or more grammars, it
can be found in queries/
. Otherwise, its version for grammar xxx
is located
at grammars/xxx/queries/
.
Corpus tests for a grammar xxx
are located at grammars/xxx/tests/corpus/
.
Highlight tests of all grammars are located at tests/highlight/
.