1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Strongly-typed AST types for Lua, auto-generated from
//! [`tree-sitter-lua`](https://docs.rs/tree-sitter-lua)'s `node-types.json`.
//!
//! This crate is generated by [`treesitter-types`](https://docs.rs/treesitter-types) and is
//! automatically kept up to date when a new version of the grammar crate is released.
//!
//! See the [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) project for more
//! information about the underlying parser framework.
//!
//! # Example
//!
//! ```
//! use treesitter_types_lua::*;
//!
//! // A minimal Lua hello-world program.
//! let src = b"\
//! function greet(name)
//! print(\"Hello, \" .. name .. \"!\")
//! end
//!
//! greet(\"World\")
//! ";
//!
//! // Parse the source with tree-sitter and convert into typed AST.
//! let mut parser = tree_sitter::Parser::new();
//! parser.set_language(&tree_sitter_lua::LANGUAGE.into()).unwrap();
//! let tree = parser.parse(src, None).unwrap();
//! let chunk = Chunk::from_node(tree.root_node(), src).unwrap();
//!
//! // The chunk has two top-level children:
//! // a function statement and a function call statement.
//! assert_eq!(chunk.children.len(), 2);
//! assert_eq!(chunk.span.start.row, 0);
//! assert!(chunk.span.end.row >= 4);
//! ```
pub use ;
pub use *;