Package org.prism
Class Nodes.ConstantWriteNode
java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.ConstantWriteNode
- Enclosing class:
- Nodes
Represents writing to a constant. Foo = 1 ^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal String
The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants).final Nodes.Node
The value to write to the constant.Fields inherited from class org.prism.Nodes.Node
EMPTY_ARRAY, length, nodeId, startOffset
-
Constructor Summary
ConstructorsConstructorDescriptionConstantWriteNode
(int nodeId, int startOffset, int length, String name, Nodes.Node value) -
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
-
name
The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). Foo = :bar # name `:Foo` XYZ = 1 # name `:XYZ`
-
value
The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). FOO = :bar ^^^^ MyClass = Class.new ^^^^^^^^^
-
-
Constructor Details
-
ConstantWriteNode
-
-
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
-