Class: GuardedBody
Represents the body of an Equation that does have guards. For example, Haskell's guards
Example
ts
f x
| x > 2 = x * 2
| otherwise = x / 2Constructors
Constructor
new GuardedBody(
condition,body,loc?):GuardedBody
Parameters
| Parameter | Type |
|---|---|
condition | Expression |
body | Expression |
loc? | SourceLocation |
Returns
GuardedBody
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