Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ziglibs/tree-sitter-zig
Zig tree-sitter grammar
https://github.com/ziglibs/tree-sitter-zig
tree-sitter zig
Last synced: 2 months ago
JSON representation
Zig tree-sitter grammar
- Host: GitHub
- URL: https://github.com/ziglibs/tree-sitter-zig
- Owner: ziglibs
- License: mit
- Created: 2023-04-22T21:31:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-27T14:41:41.000Z (over 1 year ago)
- Last Synced: 2023-09-28T01:47:14.628Z (over 1 year ago)
- Topics: tree-sitter, zig
- Language: JavaScript
- Homepage:
- Size: 1.89 MB
- Stars: 13
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tree-sitter-zig
[tree-sitter](https://github.com/tree-sitter/tree-sitter) grammar inspired by and partially built on [maxxnino/tree-sitter-zig](https://github.com/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
```bash
npm i
```Then:
```bash
.\node_modules\.bin\tree-sitter generate; .\node_modules\.bin\tree-sitter parse .\test\samples\hello.zig
``````bash
node .\test\valid.mjs --path=C:\Programming\Zig\zig\test\cases
```