3 unstable releases
0.1.0 | Nov 6, 2024 |
---|---|
0.0.2 | Jul 27, 2024 |
0.0.1 | Jul 27, 2024 |
#275 in Text editors
31 downloads per month
Used in 2 crates
290KB
10K
SLoC
Tree-Sitter grammar for the SUS Language
Generated using tree-sitter. Used as the parsing front-end of the sus-compiler.
The SUS compiler repository is here.
This package provides bindings for C, C++, and Rust. (And tree-sitter implemented a few more but who's counting. )
The language definition is in grammar.js. For examples, see the SUS compiler repository.
lib.rs
:
This crate provides sus 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_sus::language()).expect("Error loading sus grammar");
let tree = parser.parse(code, None).unwrap();
Dependencies
~2.8–4MB
~77K SLoC