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.NodeRepresents 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> 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
-
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:
visitChildNodesin classNodes.Node
-
childNodes
- Specified by:
childNodesin classNodes.Node
-
accept
- Specified by:
acceptin classNodes.Node
-
toString
- Specified by:
toStringin classNodes.Node
-