Class Nodes.CallOrWriteNode

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

public static final class Nodes.CallOrWriteNode extends Nodes.Node
 Represents the use of the `||=` operator on a call.

     foo.bar ||= value
     ^^^^^^^^^^^^^^^^^
 
  • Field Details

    • flags

      public final short flags
    • receiver

      public final Nodes.Node receiver
       The object that the method is being called on. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
      
           foo.bar ||= value
           ^^^
       
    • read_name

      public final byte[] read_name
       Represents the name of the method being called.
      
           foo.bar ||= value # read_name `:bar`
               ^^^
       
    • write_name

      public final byte[] write_name
       Represents the name of the method being written to.
      
           foo.bar ||= value # write_name `:bar=`
               ^^^
       
    • value

      public final Nodes.Node value
       Represents the value being assigned.
      
           foo.bar ||= value
                       ^^^^^
       
  • Constructor Details

    • CallOrWriteNode

      public CallOrWriteNode(int nodeId, int startOffset, int length, short flags, Nodes.Node receiver, byte[] read_name, byte[] write_name, Nodes.Node value)
  • Method Details