Lua supports multivariable assignment.
Therefore it supports multivariable declarations.
The values are determined at runtime and follow
the specification here:
https://www.lua.org/pil/5.1.html
A very simple LUA evaluator using
a basic implementation of the standard
runtime StdRuntime. Can be used
whereever EvaluatorMixin is expected.
If someone wants to get started using this library
this is what they want to use.
The generic variant of lua's for-loop control structure.
Unlike the step-wise variant, this evaluates exprs
and stores them in vars following the multi-variable
assignment rules in this language. That is, if there are
too many returned results and not enough vars, then
the remaining vars will be nil.
Represents a linked list of conditional statements.
Consider the chain if -> elif -> elif -> else.
Therefore else statements are IfStmt without an expr.
See IfStmt.terminalElse constructor.
Represents identifiers in lua.
Anything that is not a keyword or an expression
is likely an identifier like a variable name or
table fields. The spec defines labels as identifiers
but those are encoded in this lib by GotoLabelStmt.
This abstraction visits every node class variant.
Visitors are the staple of this runtime implementation.
They can be used to implement semantic checks as well
as implement runtimes. Additionally custom visitors c
an walk the AST of a program and generate lua bytecode.