3 unstable releases

0.1.0 Nov 6, 2024
0.0.2 Jul 27, 2024
0.0.1 Jul 27, 2024

#262 in Text editors

Download history 68/week @ 2024-07-29 1/week @ 2024-08-12 2/week @ 2024-08-26 21/week @ 2024-09-16 30/week @ 2024-09-23 24/week @ 2024-09-30 117/week @ 2024-11-04 12/week @ 2024-11-11

129 downloads per month
Used in 2 crates

GPL-3.0-or-later

290KB
10K SLoC

C 10K SLoC JavaScript 269 SLoC // 0.1% comments Rust 31 SLoC // 0.5% comments

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
~75K SLoC