#parser #luau #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

#23 in #luau

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.8–4MB
~74K SLoC