28 releases

0.0.28 Jan 3, 2025
0.0.27 Jan 3, 2025
0.0.26 Dec 29, 2024
0.0.22 Sep 13, 2024
0.0.15 Jun 29, 2024

#147 in Text editors

Download history 37/week @ 2024-09-24 14/week @ 2024-10-01 4/week @ 2024-12-03 55/week @ 2024-12-10 326/week @ 2024-12-24 285/week @ 2024-12-31 18/week @ 2025-01-07

629 downloads per month

MIT license

545KB
20K SLoC

C 20K SLoC JavaScript 477 SLoC // 0.0% comments Rust 30 SLoC // 0.2% comments

tree-sitter-inference

CI crates

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 grammar
  • t test the grammar with the test files in test/corpus
  • bt build and test the grammar
  • te run parse with the latest grammar build on the example.inf file

References


lib.rs:

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());

Dependencies

~3–4MB
~80K SLoC