9 releases

0.1.8 Apr 2, 2024
0.1.7 Apr 1, 2024
0.1.6 Oct 25, 2023
0.1.5 Aug 26, 2023
0.1.2 Sep 11, 2021

#282 in Rendering

Download history 11/week @ 2024-02-21 15/week @ 2024-02-28 1/week @ 2024-03-06 2/week @ 2024-03-13 219/week @ 2024-03-27 135/week @ 2024-04-03 59/week @ 2024-04-10 8/week @ 2024-04-17

67 downloads per month

MIT license

7MB
196K SLoC

C 196K SLoC JavaScript 146 SLoC Scheme 101 SLoC Rust 32 SLoC // 0.3% comments

tree-sitter-glsl

This is a extension of tree-sitter-c to support the syntax of GLSL (https://www.khronos.org/opengl/wiki/Core_Language_(GLSL)).


lib.rs:

This crate provides glsl 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_glsl::language()).expect("Error loading glsl grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–4MB
~71K SLoC