2 unstable releases
0.2.0 | Apr 11, 2024 |
---|---|
0.1.0 | Mar 25, 2024 |
#2792 in Parser implementations
71 downloads per month
320KB
12K
SLoC
Tree Sitter WIT
A Tree Sitter grammar for parsing WIT.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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