NStateDecl
Represents a state declaration node in the AST. States can be either temporary (new state) or permanent.
Instance Members
temporary: BoolWhether this state is temporary (new state).
fields: Array<NObjectField>Fields defined for this state.
style: BlockStyleBlock style of this state
type(): String| Returns |
|---|
| String |
| Name | Type |
|---|---|
name |
String |
| Returns |
|---|
| NExpr |
each(handleNode: Function): Void| Name | Type |
|---|---|
handleNode |
Function |
toJson(): DynamicConverts the state declaration to a JSON representation.
| Returns | Description |
|---|---|
| Dynamic | Dynamic object containing state data |
new(id: NodeId, pos: Position, temporary: Bool, fields: Array<NObjectField>, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): VoidCreates a new state declaration node.
| Name | Type | Default | Description |
|---|---|---|---|
id |
NodeId | ||
pos |
Position | Position in source where this state appears | |
temporary |
Bool | Whether this is a temporary state | |
fields |
Array<NObjectField> | Array of property definitions | |
leadingComments |
Array<Comment> | (optional) | Optional comments before the state |
trailingComments |
Array<Comment> | (optional) | Optional comments after the state |