#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

#13 in #luau

Download history 7/week @ 2024-01-20 2/week @ 2024-02-17 18/week @ 2024-02-24 1/week @ 2024-03-02 7/week @ 2024-03-09 2/week @ 2024-03-16 29/week @ 2024-03-30 2/week @ 2024-04-06 48/week @ 2024-04-13

79 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