1 unstable release
new 0.6.1 | Jan 28, 2025 |
---|
#171 in Parser tooling
73 downloads per month
65KB
2.5K
SLoC
tree-sitter-godot-resource
Godot resource grammar for tree-sitter.
Parses tscn and tres files.
lib.rs
:
This crate provides GodotResource language support for the tree-sitter parsing library.
Typically, you will use the [LANGUAGE][] constant 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();
let language = tree_sitter_godot_resource::LANGUAGE;
parser
.set_language(&language.into())
.expect("Error loading GodotResource parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());
Dependencies
~4–310KB