3 releases (breaking)
0.2.0 | Mar 22, 2023 |
---|---|
0.1.0 | Feb 14, 2023 |
0.0.1 | Feb 1, 2023 |
#482 in Development tools
730 downloads per month
170KB
3.5K
SLoC
tree-sitter-stack-graphs definition for Java
This project defines tree-sitter-stack-graphs rules for Java using the tree-sitter-java grammar.
Local Development
The project is organized as follows:
- The stack graph rules are defined in
src/stack-graphs.tsg
. - Tests are put into the
test
directory.
The following commands are intended to be run from the repo root.
Run all tests in the project by executing the following:
cargo test -p tree-sitter-stack-graphs-java
Parse a single test file:
cargo run -p tree-sitter-stack-graphs-java -- parse OPTIONS FILENAME
Test a single file:
cargo run -p tree-sitter-stack-graphs-java -- test OPTIONS FILENAME
For debugging purposes, it is useful to run the visualization tool to generate graphs for the tests being run.
To run a test and generate the visualization:
cargo run -p tree-sitter-stack-graphs-java -- test --output-mode=always -V=%r/%d/%n.html FILENAME
Go to https://crates.io/crates/tree-sitter-stack-graphs for links to examples and documentation.
Dependencies
~10–17MB
~337K SLoC