Skip to content

Class: UnguardedBody

Represents the body of an Equation that does not have guards. Most languages match the body of its equations to it.

Examples

ts
f x = x + 2
// The body is the `x + 2` part
ts
function f(x) {
   return x + 2;
}

Constructors

Constructor

new UnguardedBody(sequence, loc?): UnguardedBody

Parameters

ParameterType
sequenceSequence
loc?SourceLocation

Returns

UnguardedBody

Overrides

ASTNode.constructor

Methods

getMetadata()

getMetadata<T>(key): T

Type Parameters

Type Parameter
T

Parameters

ParameterType
keystring

Returns

T

Inherited from

ASTNode.getMetadata


hasMetadata()

hasMetadata(key): boolean

Parameters

ParameterType
keystring

Returns

boolean

Inherited from

ASTNode.hasMetadata


setMetadata()

setMetadata(key, value): void

Parameters

ParameterType
keystring
valueany

Returns

void

Inherited from

ASTNode.setMetadata