NFunctionDecl
Represents a callable function in the AST
Instance Members
The function name (if any)
Argument names
code: StringThe actual code of the function (including the signature)
external: BoolWhether this is an external function (so this is only a declaration without implementation)
type(): String| Returns |
|---|
| String |
toJson(): DynamicConverts the literal to a JSON representation.
| Returns | Description |
|---|---|
| Dynamic | Dynamic object containing literal data |
new(id: NodeId, pos: Position, name: Null<String>, args: Array<String>, code: String, external: Bool, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): VoidCreates a new function node.
| Name | Type | Default | Description |
|---|---|---|---|
id |
NodeId | ||
pos |
Position | Position in source where this function appears | |
name |
Null<String> | The function name (if any) | |
args |
Array<String> | Argument names | |
code |
String | The actual code of the function (including the signature) | |
external |
Bool | Whether this is an external function (so this is only a declaration without implementation) | |
leadingComments |
Array<Comment> | (optional) | Optional comments before the function |
trailingComments |
Array<Comment> | (optional) | Optional comments after the function |