OR-1 dataflow CPU sketch
at main 44 lines 1.7 kB view raw view rendered
1# Tree-sitter CLI 2 3[![crates.io badge]][crates.io] [![npmjs.com badge]][npmjs.com] 4 5[crates.io]: https://crates.io/crates/tree-sitter-cli 6[crates.io badge]: https://img.shields.io/crates/v/tree-sitter-cli.svg?color=%23B48723 7[npmjs.com]: https://www.npmjs.org/package/tree-sitter-cli 8[npmjs.com badge]: https://img.shields.io/npm/v/tree-sitter-cli.svg?color=%23BF4A4A 9 10The Tree-sitter CLI allows you to develop, test, and use Tree-sitter grammars from the command line. It works on `MacOS`, `Linux`, and `Windows`. 11 12### Installation 13 14You can install the `tree-sitter-cli` with `cargo`: 15 16```sh 17cargo install --locked tree-sitter-cli 18``` 19 20or with `npm`: 21 22```sh 23npm install tree-sitter-cli 24``` 25 26You can also download a pre-built binary for your platform from [the releases page]. 27 28### Dependencies 29 30The `tree-sitter` binary itself has no dependencies, but specific commands have dependencies that must be present at runtime: 31 32* To generate a parser from a grammar, you must have [`node`](https://nodejs.org) on your PATH. 33* To run and test parsers, you must have a C and C++ compiler on your system. 34 35### Commands 36 37* `generate` - The `tree-sitter generate` command will generate a Tree-sitter parser based on the grammar in the current working directory. See [the documentation] for more information. 38 39* `test` - The `tree-sitter test` command will run the unit tests for the Tree-sitter parser in the current working directory. See [the documentation] for more information. 40 41* `parse` - The `tree-sitter parse` command will parse a file (or list of files) using Tree-sitter parsers. 42 43[the documentation]: https://tree-sitter.github.io/tree-sitter/creating-parsers 44[the releases page]: https://github.com/tree-sitter/tree-sitter/releases/latest