25 lines
636 B
Markdown
25 lines
636 B
Markdown
this will be a tree-sitter implementation for `nix-shell` files.
|
|
|
|
try one of the following:
|
|
- `nix build` => build the parser
|
|
- `nix develop` => manually/interactively generate the parser
|
|
- `tree-sitter generate`
|
|
|
|
non-flake equivalents:
|
|
- `nix-build`
|
|
- `nix-shell`
|
|
|
|
|
|
## development workflow
|
|
guide on using tree-sitter:
|
|
<https://tree-sitter.github.io/tree-sitter/creating-parsers>
|
|
|
|
roughly:
|
|
1. `nix develop`
|
|
2. `tree-sitter generate`
|
|
3. `tree-sitter test`
|
|
|
|
run `make clean` from within the `nix develop` shell before committing to avoid checking in build artifacts.
|
|
|
|
the parser is defined in `grammar.js`, and tests live in `corpus/`.
|