Package org.prism
Class Nodes.ArrayPatternNode
java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.ArrayPatternNode
- Enclosing class:
- Nodes
Represents an array pattern in pattern matching.
foo in 1, 2
^^^^^^^^^^^
foo in [1, 2]
^^^^^^^^^^^^^
foo in *bar
^^^^^^^^^^^
foo in Bar[]
^^^^^^^^^^^^
foo in Bar[1, 2, 3]
^^^^^^^^^^^^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Nodes.NodeRepresents the optional constant preceding the Array foo in Bar[] ^^^ foo in Bar[1, 2, 3] ^^^ foo in Bar::Baz[1, 2, 3] ^^^^^^^^final Nodes.Node[]Represents the elements after the rest element of the array pattern.final Nodes.Node[]Represents the required elements of the array pattern.final Nodes.NodeRepresents the rest element of the array pattern.Fields inherited from class org.prism.Nodes.Node
EMPTY_ARRAY, length, nodeId, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionArrayPatternNode(int nodeId, int startOffset, int length, Nodes.Node constant, Nodes.Node[] requireds, Nodes.Node rest, Nodes.Node[] posts) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(AbstractNodeVisitor<T> visitor) protected String<T> voidvisitChildNodes(AbstractNodeVisitor<T> visitor) Methods inherited from class org.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
constant
Represents the optional constant preceding the Array foo in Bar[] ^^^ foo in Bar[1, 2, 3] ^^^ foo in Bar::Baz[1, 2, 3] ^^^^^^^^ -
requireds
Represents the required elements of the array pattern. foo in [1, 2] ^ ^ -
rest
Represents the rest element of the array pattern. foo in *bar ^^^^ -
posts
Represents the elements after the rest element of the array pattern. foo in *bar, baz ^^^
-
-
Constructor Details
-
ArrayPatternNode
public ArrayPatternNode(int nodeId, int startOffset, int length, Nodes.Node constant, Nodes.Node[] requireds, Nodes.Node rest, Nodes.Node[] posts)
-
-
Method Details
-
visitChildNodes
- Specified by:
visitChildNodesin classNodes.Node
-
childNodes
- Specified by:
childNodesin classNodes.Node
-
accept
- Specified by:
acceptin classNodes.Node
-
toString
- Specified by:
toStringin classNodes.Node
-