Class Nodes.ConstantPathWriteNode
java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.ConstantPathWriteNode
- Enclosing class:
Nodes
Represents writing to a constant path.
::Foo = 1
^^^^^^^^^
Foo::Bar = 1
^^^^^^^^^^^^
::Foo::Bar = 1
^^^^^^^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Nodes.ConstantPathNodeA node representing the constant path being written to.final Nodes.NodeThe value to write to the constant path.Fields inherited from class org.prism.Nodes.Node
EMPTY_ARRAY, length, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionConstantPathWriteNode(int startOffset, int length, Nodes.ConstantPathNode target, Nodes.Node value) -
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
-
target
A node representing the constant path being written to. Foo::Bar = 1 ^^^^^^^^ ::Foo = :abc ^^^^^ -
value
The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). FOO::BAR = :abc ^^^^
-
-
Constructor Details
-
ConstantPathWriteNode
public ConstantPathWriteNode(int startOffset, int length, Nodes.ConstantPathNode target, Nodes.Node value)
-
-
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
-