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.Node
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.Node
Represents 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> T
accept
(AbstractNodeVisitor<T> visitor) protected String
<T> void
visitChildNodes
(AbstractNodeVisitor<T> visitor) Methods inherited from class org.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
constant
-
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:
visitChildNodes
in classNodes.Node
-
childNodes
- Specified by:
childNodes
in classNodes.Node
-
accept
- Specified by:
accept
in classNodes.Node
-
toString
- Specified by:
toString
in classNodes.Node
-