Package org.ruby_lang.prism
Class Nodes.ConstantPathNode
java.lang.Object
org.ruby_lang.prism.Nodes.Node
org.ruby_lang.prism.Nodes.ConstantPathNode
- Enclosing class:
- Nodes
Represents accessing a constant through a path of `::` operators.
Foo::Bar
^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal byte[]The name of the constant being accessed.final Nodes.NodeThe left-hand node of the path, if present.Fields inherited from class org.ruby_lang.prism.Nodes.Node
EMPTY_ARRAY, length, nodeId, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionConstantPathNode(int nodeId, int startOffset, int length, Nodes.Node parent, byte[] name) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(AbstractNodeVisitor<T> visitor) protected String<T> voidvisitChildNodes(AbstractNodeVisitor<T> visitor) Methods inherited from class org.ruby_lang.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
parent
The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. Foo::Bar ^^^ self::Test ^^^^ a.b::C ^^^ -
name
public final byte[] nameThe name of the constant being accessed. This could be `nil` in the event of a syntax error.
-
-
Constructor Details
-
ConstantPathNode
-
-
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
-