LuaFuncBuilder class
This class provides an API for effortlessly constructing lua function objects.
Use LuaFuncBuilder.create and then chain calls with arg to introduce terms to the final function definition. Use self if the function should support 'self' as a parameter in-place. Use exec to provide a closure definition. This also acts as the terminator to build the FuncExpr node and returns the LuaObject result.
Constructors
- LuaFuncBuilder.create(String id)
-
factory
Properties
Methods
-
arg(
String id, {bool optional = false}) → LuaFuncBuilder -
Create a DeclArg node corresponding to the
id. Ifoptionalis true, then any generated HTML documentation will decorate this parameter with '[]' pairs. This named argument does nothing to the semantics or the lua runtime. -
exec(
{Function? call}) → LuaObject -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
self(
) → LuaFuncBuilder -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited