NChoiceStatement

NodeAstNodeloreline.NChoiceStatement (Class)

Represents a choice statement in the AST.

Instance Members

Array of available options in this choice.


The block style of the choice statement


type(): String
Returns
String

each(handleNode: Function): Void
Name Type
handleNode Function

toJson(): Dynamic

Converts 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>): Void

Creates 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