NChoiceStatement
Represents a choice statement in the AST.
Instance Members
options: Array<NChoiceOption>Array of available options in this choice.
style: BlockStyleThe block style of the choice statement
type(): String| Returns |
|---|
| String |
each(handleNode: Function): Void| Name | Type |
|---|---|
handleNode |
Function |
toJson(): DynamicConverts the choice statement to a JSON representation.
| Returns | Description |
|---|---|
| Dynamic | Dynamic object containing choice data |
new(id: NodeId, pos: Position, options: Array<NChoiceOption>, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): VoidCreates a new choice statement node.
| Name | Type | Default | Description |
|---|---|---|---|
id |
NodeId | ||
pos |
Position | Position in source where this choice appears | |
options |
Array<NChoiceOption> | Array of available choice options | |
leadingComments |
Array<Comment> | (optional) | Optional comments before the choice |
trailingComments |
Array<Comment> | (optional) | Optional comments after the choice |