3 stable releases

1.2.0 Dec 22, 2024
1.1.0 Jan 24, 2024
1.0.0 Jun 21, 2023

#259 in Text editors

Download history 9/week @ 2024-09-22 2/week @ 2024-09-29 17/week @ 2024-12-08 1/week @ 2024-12-15 106/week @ 2024-12-22 90/week @ 2024-12-29

214 downloads per month

MIT license

695KB
27K SLoC

C 27K SLoC Scheme 330 SLoC // 0.1% comments Rust 30 SLoC

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][] constant to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = r#"
"#;
let mut parser = tree_sitter::Parser::new();
let language = tree_sitter_luau::LANGUAGE;
parser
    .set_language(&language.into())
    .expect("Error loading Luau parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

Dependencies

~4–310KB