Skip to content

ziglibs/tree-sitter-zig

Repository files navigation

tree-sitter-zig

tree-sitter grammar inspired by and partially built on maxxnino/tree-sitter-zig that's going to be made simple to query and structure-preserving on error rather than 100% adherent to the Zig spec. This grammar can successfully parse every behavior testcase, all std files, and all compiler files.

Tests

npm i

Then:

.\node_modules\.bin\tree-sitter generate; .\node_modules\.bin\tree-sitter parse .\test\samples\hello.zig
node .\test\valid.mjs --path=C:\Programming\Zig\zig\test\cases