2 unstable releases

0.2.0 Apr 11, 2024
0.1.0 Mar 25, 2024

#2792 in Parser implementations

Download history 1/week @ 2024-07-30 1/week @ 2024-09-17 20/week @ 2024-09-24 1/week @ 2024-10-01

71 downloads per month

MIT/Apache

320KB
12K SLoC

C 11K SLoC Rust 594 SLoC // 0.0% comments JavaScript 276 SLoC // 0.0% comments Scheme 44 SLoC

Tree Sitter WIT

Continuous Integration

A Tree Sitter grammar for parsing WIT.

License

This project is licensed under either of

at your option.

It is recommended to always use cargo crev to verify the trustworthiness of each of your dependencies, including this one.


lib.rs:

This crate provides Wit 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_wit::language()).expect("Error loading Wit grammar");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

Dependencies

~2.8–4MB
~78K SLoC