Class: Return
Generic return statement.
Examples
ts
// In Haskell
f x = x * 2
// The parser takes the body and uses it as a Returnts
function f(x) {
return x * 2 // The node holds this expression
}Constructors
Constructor
new Return(
body,loc?):Return
Parameters
| Parameter | Type |
|---|---|
body | Expression |
loc? | SourceLocation |
Returns
Return
Overrides
ASTNode.constructor
Methods
getMetadata()
getMetadata<
T>(key):T
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
T
Inherited from
ASTNode.getMetadata
hasMetadata()
hasMetadata(
key):boolean
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
Inherited from
ASTNode.hasMetadata
setMetadata()
setMetadata(
key,value):void
Parameters
| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
void
Inherited from
ASTNode.setMetadata