Class: ConsPattern
Represents a pattern matching the head and tail of a list (x:xs).
Extends
BinaryPattern
Constructors
Constructor
new ConsPattern(
left,right,loc?):ConsPattern
Parameters
| Parameter | Type |
|---|---|
left | Pattern |
right | Pattern |
loc? | SourceLocation |
Returns
ConsPattern
Overrides
BinaryPattern.constructor
Accessors
jsonType
Get Signature
get
protectedjsonType():BinaryPatternKind
Returns
BinaryPatternKind
Overrides
BinaryPattern.jsonType
Methods
getMetadata()
getMetadata<
T>(key):T
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
T
Inherited from
BinaryPattern.getMetadata
hasMetadata()
hasMetadata(
key):boolean
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
Inherited from
BinaryPattern.hasMetadata
is()
is<
T>(nodeType):this is T
Type Parameters
| Type Parameter |
|---|
T extends ASTNode |
Parameters
| Parameter | Type |
|---|---|
nodeType | (...args) => T |
Returns
this is T
Inherited from
BinaryPattern.is
setMetadata()
setMetadata(
key,value):void
Parameters
| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
void
Inherited from
BinaryPattern.setMetadata