#luau #parser #incremental

tree-sitter-luau

luau grammar for the tree-sitter parsing library

2 stable releases

1.1.0 Jan 24, 2024
1.0.0 Jun 21, 2023

#12 in #luau

23 downloads per month

MIT license

650KB
25K SLoC

C 24K SLoC Scheme 328 SLoC // 0.1% comments JavaScript 279 SLoC // 0.1% comments Rust 34 SLoC // 0.1% comments

tree-sitter-luau

Build Status Discord

Luau grammar for tree-sitter.

Adapted from the syntax spec


lib.rs:

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

Dependencies

~2.7–4MB
~71K SLoC