Package org.prism

Class Nodes.ConstantWriteNode

java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.ConstantWriteNode
Enclosing class:
Nodes

public static final class Nodes.ConstantWriteNode extends Nodes.Node
 Represents writing to a constant.

     Foo = 1
     ^^^^^^^
 
  • Field Details

    • name

      public final String 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

      public final Nodes.Node 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

      public ConstantWriteNode(int nodeId, int startOffset, int length, String name, Nodes.Node value)
  • Method Details