ReturnStmtDoNotUnwind mixin
Special lua runtime behavior suitable for static analysis of branching control flows.
The value returned by evaluating ReturnStmt is resolved as normal except that the callstack does not unwind. The AST walker will continue to march forward to the next statements in the block.
- Superclass constraints
Properties
- context → LuaObject?
-
Shorthand for
scope.context.no setterinherited - debugPath ↔ String?
-
For diagnostics or debugging, what the current
script path is. See onRequireImpl.
getter/setter pairinherited
- global → Scope
-
The global scope.
finalinherited
- hasContext → bool
-
Shorthand for
scope.hasContext.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- onRequireImpl ↔ LuaRequireCallback?
-
Describes to do when lua processes the
require()function.getter/setter pairinherited - results → BaseResults
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope ↔ Scope
-
The current scope.
getter/setter pairinherited
Methods
-
addDiagnostic(
String info) → void -
Build a meaningful diagnostic message from the current
runtime information and original message
info.inherited -
addError(
String err) → void -
Build a meaningful error message from the current
runtime information and original message
err.inherited -
addWarning(
String warn) → void -
Build a meaningful warning message from the current
runtime information and original message
warn.inherited -
callLuaFunction(
LuaObject obj, {List< Object?> args = const []}) → LuaObject? -
Given a callable lua
objand a list ofargs, configure a new scope with the providedargsas parameters based on the LuaObject.funcDef record. Args exceeding the parameter list will be dropped. Any remaining parameters will be filled by LuaObject.nil values. Any exceptions are caught and tracked for the trace back later. The scope is popped and any return result LuaObject is returned.inherited -
debugSetPath(
String? path) → void -
Setter for debugPath.
inherited
-
defGlobal(
LuaObject value) → LuaObject -
Defines a global variable in the global scope with
lua object
value.inherited -
defLocal(
LuaObject value) → LuaObject -
Defines a local variable in the current scope with
lua object
value.inherited -
findOnSelf(
String field, {Object? or}) → LuaObject? -
First finds
fieldinside object "self" in the current scope. If neither can be found,oris returned cast toLua. Iforis not provided, null is returned.inherited -
findVar(
String id) → LuaObject? -
Searches for a variable with the identifier
idin the current scope. The implementation details also searches the parents in order if not found locally until such anidis found.inherited -
findVarArgs(
) → List< LuaObject> ? -
Search the current scope for the special
...identifier.inherited -
lineInfo(
Token token) → String -
Given a Token, return that token's line information.
This is useful for debugging.
inherited
-
lineTag(
Token token) → String -
For variables, return (row, col) as a virtual identifier stub.
This is useful for debugging.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
popScope(
) → void -
If there exists Scope.parent, then tail adopts that.
This effectively pops the scope of execution. Otherwise
nothing happens.
inherited
-
pushScope(
{LuaObject? context}) → void -
A reverse linked list implementation where tail
points towards head (the parent chain). Calling this function
adds a new Scope node in the linked list as the new tail
and sets scope to point to the latest tail node. Every
node points to its Scope.parent.
inherited
-
tokenId(
Token token, {String? prefix}) → String -
Given a Token, construct a lua identifier stub.
If
prefixis non null, then the stub will have that prefix.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
visitAssignExpr(
AssignExpr assignExpr) → Object? -
inherited
-
visitAssignMultiExpr(
AssignMultiExpr assignMultiExpr) → Object? -
inherited
-
visitAST(
AST ast) → Object? -
The starting point of all lua programs.
This will visit every node in the tree.
The default result will be a program which
ran to completion.
inherited
-
visitBinaryExpr(
BinaryExpr expr) → Object? -
inherited
-
visitBooleanLiteral(
BooleanLiteral boolean) → Object? -
inherited
-
visitBreakStmt(
BreakStmt stmt) → Object? -
inherited
-
visitDeclArg(
DeclArg declArg) → Object? -
inherited
-
visitDeclMultiVar(
DeclMultiVar declMultiVar) → Object? -
inherited
-
visitDeclVar(
DeclVar declVar) → Object? -
inherited
-
visitForIterLoopStmt(
ForIterLoopStmt forIterLoopStmt) → Object? -
inherited
-
visitForLoopStmt(
ForLoopStmt forLoopStmt) → Object? -
inherited
-
visitFuncExpr(
FuncExpr expr) → Object? -
inherited
-
visitGotoLabelStmt(
GotoLabelStmt stmt) → Object? -
inherited
-
visitGotoStmt(
GotoStmt stmt) → Object? -
inherited
-
visitGroupExpr(
GroupExpr groupExpr) → Object? -
inherited
-
visitIfStmt(
IfStmt stmt) → Object? -
inherited
-
visitKeyValStmt(
KeyValStmt keyval) → Object? -
inherited
-
visitMemoryAccess(
MemoryAccess memoryAccess) → Object? -
inherited
-
visitNilLiteral(
NilLiteral nil) → Object? -
inherited
-
visitNotExpr(
NotExpr notExpr) → Object? -
inherited
-
visitNumberLiteral(
NumberLiteral number) → Object? -
inherited
-
visitRawExpr(
RawExpr rawExpr) → Object? -
inherited
-
visitRepeatUntilLoopStmt(
RepeatUntilLoopStmt repeatUntilLoopStmt) → Object? -
inherited
-
visitReturnStmt(
ReturnStmt expr) → Object? -
override
-
visitSelfExpr(
SelfExpr selfExpr) → Object? -
inherited
-
visitStringLiteral(
StringLiteral string) → Object? -
inherited
-
visitTableLiteral(
TableLiteral table) → Object? -
inherited
-
visitUnaryExpr(
UnaryExpr expr) → Object? -
inherited
-
visitWhileLoopStmt(
WhileLoopStmt whileLoopStmt) → Object? -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited