Class Nodes.ConstantPathNode

java.lang.Object
org.ruby_lang.prism.Nodes.Node
org.ruby_lang.prism.Nodes.ConstantPathNode
Enclosing class:
Nodes

public static final class Nodes.ConstantPathNode extends Nodes.Node
 Represents accessing a constant through a path of `::` operators.

     Foo::Bar
     ^^^^^^^^
 
  • Field Details

    • parent

      public final Nodes.Node 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[] name
       The name of the constant being accessed. This could be `nil` in the event of a syntax error.
       
  • Constructor Details

    • ConstantPathNode

      public ConstantPathNode(int nodeId, int startOffset, int length, Nodes.Node parent, byte[] name)
  • Method Details