4 releases
0.2.2 | Apr 2, 2024 |
---|---|
0.2.1 | Apr 2, 2024 |
0.2.0 | Apr 1, 2024 |
0.1.0 | Feb 21, 2024 |
#448 in Text editors
365 downloads per month
32MB
1M
SLoC
tree-sitter-slang
This is a extension of tree-sitter-cpp and tree-sitter-hlsl to support the syntax of slang.
Work in progress...
Limitations/TODOs:
- ambiguity between HLSL semantics and Slang type hints
lib.rs
:
This crate provides slang 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_slang::language()).expect("Error loading slang grammar");
let tree = parser.parse(code, None).unwrap();
Dependencies
~2.7–4MB
~71K SLoC