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
- block of statements. return statement must be optionally placed at the end of the block.
- Context
- Expr
Binary Data - Internal data for binary operation
- Expr
Function Call - function call.
prefix(args)
orprefix:method(args)
. - Expr
Function Object - Expr
Table Constructor - table constructor, a list of fields
- Expr
Table Index table[index]
,table.index
- Expr
Unary Data - Internal data for unary operation
- Function
Definition - constructing
function
. not a function object. - Label
Info - label information.
- Return
Statement - return statement
- Scope
Block - Scope
Function - Stmt
Assignment l0, l1, l2 = r0, r1, r2
. variadic...
cannot be used inlhs
- StmtFor
- for statement with start, end, step.
- Stmt
ForGeneric - for statement with generic expressions.
- Stmt
Goto - Goto statement
- StmtIf
- if statement
- Stmt
Label - Goto statement
- Stmt
Local Declaration - local variable declaration.
- Stmt
Repeat - repeat statement
- Stmt
While - while statement
- Variable
Info
Enums§
- Attrib
- local variable attribute.
either
const
orclose
. - Expr
Binary - binary operation.
lhs OP rhs
- Expr
Local Variable - Expr
Unary - unary operation.
OP x
- Expression
- lua value & expression
- IntOr
Float - Lua’s numeric representation, can be either integer or float.
- Process
Error - Scope
- Statement
- lua statement
Functions§
- process
- perform semantic analysis on the given block and generate enhanced AST.
Type Aliases§
- Float
Type - type alias for lua float type.
- IntType
- type alias for lua integer type.
- Stmt
Function Call - function call statement.