1 unstable release
0.10.0 | Mar 16, 2024 |
---|
#187 in Text editors
39 downloads per month
1MB
36K
SLoC
tree-sitter-devicetree
A tree-sitter grammar for Devicetree with support for Zephyr's superset of Devicetree syntax.
Some parts of the grammar are adapted from tree-sitter-c.
lib.rs
:
This crate provides devicetree 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 = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(tree_sitter_devicetree::language()).expect("Error loading devicetree grammar");
let tree = parser.parse(code, None).unwrap();
Dependencies
~2.7–4MB
~71K SLoC