Rust Grammar for Tree-sitter
This crate provides Brokk's independently maintained package of the
tree-sitter/tree-sitter-rust
grammar. It prefixes all native symbols so it can coexist with the upstream
Rust grammar crate in one executable.
To use this crate, add it to the [dependencies] section of your Cargo.toml:
= "0.25"
= "=0.24.3"
Typically, use the LANGUAGE constant with a tree-sitter Parser:
let code = r#"
pub trait LendingIterator<'a> = Iterator<Item = &'a str>;
"#;
let mut parser = new;
parser
.set_language
.expect;
let parsed = parser.parse.unwrap;
assert!;