NLiteral
Represents literal values in the AST (numbers, booleans, arrays, objects).
Instance Members
value: AnyThe literal value.
Type of the literal value.
type(): String| Returns |
|---|
| String |
each(handleNode: Function): Void| Name | Type |
|---|---|
handleNode |
Function |
toJson(): DynamicConverts the literal to a JSON representation.
| Returns | Description |
|---|---|
| Dynamic | Dynamic object containing literal data |
new(id: NodeId, pos: Position, value: Any, literalType: Anonymous, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): VoidCreates a new literal node.
| Name | Type | Default | Description |
|---|---|---|---|
id |
NodeId | ||
pos |
Position | Position in source where this literal appears | |
value |
Any | The literal value | |
literalType |
Anonymous | ||
leadingComments |
Array<Comment> | (optional) | Optional comments before the literal |
trailingComments |
Array<Comment> | (optional) | Optional comments after the literal |
Metadata
| Name | Parameters |
|---|---|
:hxGen |
- |