Package org.prism
Class Nodes.CapturePatternNode
java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.CapturePatternNode
- Enclosing class:
- Nodes
Represents assigning to a local variable in pattern matching. foo => [bar => baz] ^^^^^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionRepresents the target of the capture.final Nodes.Node
Represents the value to capture.Fields inherited from class org.prism.Nodes.Node
EMPTY_ARRAY, length, nodeId, startOffset
-
Constructor Summary
ConstructorsConstructorDescriptionCapturePatternNode
(int nodeId, int startOffset, int length, Nodes.Node value, Nodes.LocalVariableTargetNode target) -
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
-
value
Represents the value to capture. foo => bar ^^^
-
target
Represents the target of the capture. foo => bar ^^^
-
-
Constructor Details
-
CapturePatternNode
public CapturePatternNode(int nodeId, int startOffset, int length, Nodes.Node value, Nodes.LocalVariableTargetNode target)
-
-
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
-