Crate lua_semantics
source ·Expand description
// type of `lua_parser::Block`
let block = lua_parser::parse_str( ... )?;
// semantic analysis, and generate enhanced AST for later use.
let enhanced_ast = lua_semantics::process(block)?;Structs§
- block of statements. return statement must be optionally placed at the end of the block.
- Internal data for binary operation
- function call.
prefix(args)orprefix:method(args). - table constructor, a list of fields
table[index],table.index- Internal data for unary operation
- constructing
function. not a function object. - label information.
- return statement
l0, l1, l2 = r0, r1, r2. variadic...cannot be used inlhs- for statement with start, end, step.
- for statement with generic expressions.
- Goto statement
- if statement
- Goto statement
- local variable declaration.
- repeat statement
- while statement
Enums§
- local variable attribute. either
constorclose. - binary operation.
lhs OP rhs - unary operation.
OP x - lua value & expression
- Lua’s numeric representation, can be either integer or float.
- lua statement
Functions§
- perform semantic analysis on the given block and generate enhanced AST.
Type Aliases§
- type alias for lua float type.
- type alias for lua integer type.
- function call statement.