#incremental #parsing #lua

tree-sitter-lua

Lua grammar for the tree-sitter parsing library

13 releases

0.0.14 Oct 31, 2022
0.0.13 Sep 15, 2022
0.0.12 Jul 16, 2022
0.0.10 Apr 8, 2022
0.0.2 Aug 9, 2021

#53 in Text editors

Download history 59/week @ 2022-11-25 66/week @ 2022-12-02 120/week @ 2022-12-09 94/week @ 2022-12-16 65/week @ 2022-12-23 79/week @ 2022-12-30 87/week @ 2023-01-06 128/week @ 2023-01-13 124/week @ 2023-01-20 118/week @ 2023-01-27 128/week @ 2023-02-03 121/week @ 2023-02-10 92/week @ 2023-02-17 84/week @ 2023-02-24 65/week @ 2023-03-03 83/week @ 2023-03-10

336 downloads per month
Used in ast-grep-language

MIT license

320KB
12K SLoC

C 12K SLoC JavaScript 393 SLoC // 0.2% comments Rust 34 SLoC // 0.4% comments

GitHub Workflow Status: CI

tree-sitter-lua

Lua grammar for tree-sitter.

References

Acknowledgement

The external scanner was based on these repositories:

License

Licensed under the MIT License. Check the LICENSE file for details.


lib.rs:

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

Dependencies

~1.3–1.9MB
~51K SLoC