#wgsl #tree-sitter #parser

tree-sitter-wgsl

wgsl grammar for the tree-sitter parsing library

6 releases

0.0.6 Jun 13, 2022
0.0.5 May 17, 2022
0.0.4 Jan 19, 2022
0.0.3 Nov 12, 2021
0.0.1 Sep 12, 2021

#29 in #wgsl

CC0 license

1MB
29K SLoC

C 28K SLoC // 0.0% comments JavaScript 822 SLoC // 0.0% comments Rust 34 SLoC // 0.4% comments

tree-sitter-wgsl


lib.rs:

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

Dependencies

~2.8–4MB
~76K SLoC