Strongly-typed AST types for Lua, auto-generated from
tree-sitter-lua's node-types.json.
This crate is generated by treesitter-types and is
automatically kept up to date when a new version of the grammar crate is released.
See the Tree-sitter project for more information about the underlying parser framework.
Example
use *;
// 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 = new;
parser.set_language.unwrap;
let tree = parser.parse.unwrap;
let chunk = from_node.unwrap;
// The chunk has two top-level children:
// a function statement and a function call statement.
assert_eq!;
assert_eq!;
assert!;