21 releases

0.0.21 Aug 19, 2024
0.0.20 Jul 27, 2024
0.0.15 Jun 29, 2024

#165 in Text editors

Download history 774/week @ 2024-06-18 378/week @ 2024-06-25 55/week @ 2024-07-02 318/week @ 2024-07-16 225/week @ 2024-07-23 71/week @ 2024-07-30 36/week @ 2024-08-13 95/week @ 2024-08-20

131 downloads per month

MIT license

510KB
18K SLoC

C 18K SLoC JavaScript 445 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.

Status

  • Discord

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

~2.7–4MB
~72K SLoC