Class Nodes.ConstantPathNode
java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.ConstantPathNode
- Enclosing class:
Nodes
Represents accessing a constant through a path of `::` operators.
Foo::Bar
^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal org.jruby.RubySymbolThe name of the constant being accessed.final Nodes.NodeThe left-hand node of the path, if present.Fields inherited from class org.prism.Nodes.Node
EMPTY_ARRAY, length, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionConstantPathNode(int startOffset, int length, Nodes.Node parent, org.jruby.RubySymbol name) -
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
-
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 org.jruby.RubySymbol 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
-