FuncExpr class
Function declarations can be assigned to variables and are therefore math expressions.
Constructors
-
FuncExpr.anonymous(Token token, {required List<
Stmt> body, required List<DeclArg> args}) - Construct a function without an id.
- FuncExpr.local(FuncExpr from)
-
Constructs a local function out of
from. -
FuncExpr.named(Token token, {required List<
Stmt> body, required List<DeclArg> args, required List<RawExpr> idParts}) - Construct a function with an id.
Properties
-
args
→ List<
DeclArg> -
final
- argsHtml → String
-
Convenience method to generate html stubs
when generating documentation.
no setter
-
body
→ List<
Stmt> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The identifier for this function.
Generally the name of the function in scope.
It can be composed of a chain of memory access
expressions. e.g.
foo:bar().doh.no setter -
idParts
→ List<
RawExpr> -
final
- isAnonymous → bool
-
Functions that are declared without an
id are anonymous functions.
no setter
- local → bool
-
Whether or not this function was declare
with 'local' keyword.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → Token
-
The lexeme and pos in the doc.
final
Methods
-
accept<
R> (Visitor< R> v) → R -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited