4 releases (2 breaking)

new 0.2.0 Mar 6, 2025
0.1.0 Nov 6, 2024
0.0.2 Jul 27, 2024
0.0.1 Jul 27, 2024

#265 in Text editors

Download history 10/week @ 2024-11-15 4/week @ 2024-11-22 1/week @ 2024-11-29 15/week @ 2024-12-06 3/week @ 2024-12-13 2/week @ 2025-02-07 5/week @ 2025-02-14 58/week @ 2025-02-28

73 downloads per month
Used in 2 crates

GPL-3.0-or-later

255KB
8K SLoC

C 8K SLoC JavaScript 274 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.8–4MB
~79K SLoC