#incremental #parsing #glsl

tree-sitter-glsl

GLSL grammar for the tree-sitter parsing library

7 releases

0.1.6 Oct 25, 2023
0.1.5 Aug 26, 2023
0.1.4 Nov 24, 2022
0.1.3 May 21, 2022
0.1.2 Sep 11, 2021

#208 in Rendering

Download history 18/week @ 2023-10-31 9/week @ 2023-11-07 12/week @ 2023-11-14 15/week @ 2023-11-21 21/week @ 2023-11-28 3/week @ 2023-12-05 3/week @ 2023-12-12 13/week @ 2023-12-19 18/week @ 2023-12-26 9/week @ 2024-01-02 6/week @ 2024-01-09 5/week @ 2024-01-16 8/week @ 2024-01-23 16/week @ 2024-01-30 7/week @ 2024-02-06 32/week @ 2024-02-13

64 downloads per month

MIT license

5.5MB
150K SLoC

C 150K SLoC JavaScript 133 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.6–4MB
~68K SLoC