lua/visitors/runtime/base library
Classes
- BaseResults
- The result of processing a lua script can omit errors, warnings, or custom diagnostic info. This results class collects such information at run-time and it is up to the user to decide when to reveal the information to the user.
- BaseRuntime
- Implements common Lua runtime logic. Extend with mixin ReturnStmtCallStackUnwind or ReturnStmtDoNotUnwind.
- CoCtrlStruct
- NOTE: Incomplete coroutines. May be removed. Whenever a language construct would move the program's execution out of the normal tree walk, we can refer to this structure and obtain the exact location to resume.
- RuntimeCallbacks
- A configuration class enabling the programmer to define what happens onErrors, onWarnings, or onDiagnostics.
Mixins
- ReturnStmtCallStackUnwind
- Normal lua runtime behavior implementation for ReturnStmt.
- ReturnStmtDoNotUnwind
- Special lua runtime behavior suitable for static analysis of branching control flows.
Extensions
- ObjectAsTypeOrNull on Object
- Truthy on Object?
-
Helper to convert Object to a lua
trueorfalseequivalent used in boolean expressions. -
VisitArgPack
on List<
MathExpr>
Functions
-
debugLuaTypeInfo(
Object? o) → String -
Given an instance of Object?, return a String
value of the best-representing lua type.
If
ois LuaObject, then calls LuaObject.luaTypeInfo. If the instance cannot be resolved to a lua type, fallback on Object.runtimeType. This is used in error reporting to the user so as not to confuse users if aois a type native to dart.
Typedefs
- LuaExceptionCallback = void Function(Object)
- Custom exception handling if needed.
-
TraceCallback
= void Function(Set<
String> ) - The function type to respond to the scope being unwound. When reporting errors. See RuntimeCallbacks.