32 releases
new 0.0.32 | May 7, 2025 |
---|---|
0.0.29 | Mar 11, 2025 |
0.0.26 | Dec 29, 2024 |
0.0.22 | Sep 13, 2024 |
0.0.20 | Jul 27, 2024 |
#143 in Text editors
220 downloads per month
480KB
17K
SLoC
This crate provides Inference language support for the tree-sitter parsing library.
Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:
let code = r#"
"#;
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_inference::language()).expect("Error loading Inference grammar");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());
tree-sitter-inference
Inference grammar for tree-sitter based on Inference Language spec.
Development
For the simplifying development and testing process the number of npm
scripts is provided.
It can be used with the following options:
b
build the grammart
test the grammar with the test files intest/corpus
bt
build and test the grammarte
run parse with the latest grammar build on theexample.inf
file
References
Dependencies
~3–4.5MB
~82K SLoC