2 releases
0.0.2 | Jul 27, 2024 |
---|---|
0.0.1 | Jul 27, 2024 |
#242 in Text editors
75 downloads per month
Used in 2 crates
295KB
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.7–4MB
~73K SLoC