-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
# tree-sitter-koto | ||
|
||
[Tree-sitter](https://tree-sitter.github.io) parser for [Koto](https://koto.dev). | ||
[Tree-sitter][tree-sitter] parser for [Koto][koto]. | ||
|
||
## Development | ||
|
||
The [justfile][just] contains some commands that are | ||
useful during development, in particular `just test` which will generate the | ||
tree-sitter parser from [`grammar.js`](./grammar.js) and then run the tests | ||
contained in [`test/corpus`](./test/corpus). | ||
|
||
`just watch test` will re-run `just test` when files are updated. | ||
|
||
Arguments can be passed to `just watch test`, | ||
e.g. `just watch test --debug -f identifiers` will generate the parser with | ||
debug logging enabled, and then run only the `identifiers` test. | ||
|
||
[`src/scanner.c`](./src/scanner.c) contains the [external scanner][scanner] used | ||
by the grammar, handling some of the more complex aspects of parsing Koto code. | ||
Debug logging for the scanner can be enabled via a preprocesser definition at the | ||
top of the file. | ||
|
||
[koto]: https://koto.dev | ||
[just]: https://github.com/casey/just | ||
[tree-sitter]: https://tree-sitter.github.io | ||
[scanner]: https://tree-sitter.github.io/tree-sitter/creating-parsers#external-scanners |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters