1. Prism::
  2. IndexAndWriteNode

class Prism::IndexAndWriteNode

Represents the use of the&&= operator on a call to the[] method.

foo.bar[baz] &&= value^^^^^^^^^^^^^^^^^^^^^^

Attributes

arguments[R]

attr_reader arguments:ArgumentsNode?

block[R]

attr_reader block:BlockArgumentNode?

receiver[R]

attr_reader receiver: Prism::node?

value[R]

attr_reader value: Prism::node

Public Class Methods

Source
# File lib/prism/node.rb, line 9148definitialize(source,node_id,location,flags,receiver,call_operator_loc,opening_loc,arguments,closing_loc,block,operator_loc,value)@source =source@node_id =node_id@location =location@flags =flags@receiver =receiver@call_operator_loc =call_operator_loc@opening_loc =opening_loc@arguments =arguments@closing_loc =closing_loc@block =block@operator_loc =operator_loc@value =valueend

Initialize a newIndexAndWriteNode node.

Source
# File lib/prism/node.rb, line 9322defself.type:index_and_write_nodeend

Return a symbol representation of this node type. SeeNode::type.

Public Instance Methods

Source
# File lib/prism/node.rb, line 9328def===(other)other.is_a?(IndexAndWriteNode)&&    (flags===other.flags)&&    (receiver===other.receiver)&&    (call_operator_loc.nil?==other.call_operator_loc.nil?)&&    (opening_loc.nil?==other.opening_loc.nil?)&&    (arguments===other.arguments)&&    (closing_loc.nil?==other.closing_loc.nil?)&&    (block===other.block)&&    (operator_loc.nil?==other.operator_loc.nil?)&&    (value===other.value)end

Implements case-equality for the node. This is effectively == but without comparing the value of locations. Locations are checked only for presence.

Source
# File lib/prism/node.rb, line 9164defaccept(visitor)visitor.visit_index_and_write_node(self)end

def accept: (Visitor visitor) -> void

Source
# File lib/prism/node.rb, line 9212defattribute_write?flags.anybits?(CallNodeFlags::ATTRIBUTE_WRITE)end

def attribute_write?: () -> bool

Source
# File lib/prism/node.rb, line 9292defcall_operatorcall_operator_loc&.sliceend

defcall_operator: () ->String?

Source
# File lib/prism/node.rb, line 9225defcall_operator_loclocation =@call_operator_loccaselocationwhennilnilwhenLocationlocationelse@call_operator_loc =Location.new(source,location>>32,location&0xFFFFFFFF)endend

attr_readercall_operator_loc:Location?

Source
# File lib/prism/node.rb, line 9169defchild_nodes  [receiver,arguments,block,value]end

defchild_nodes: () ->Array

Also aliased as:deconstruct
Source
# File lib/prism/node.rb, line 9302defclosingclosing_loc.sliceend

def closing: () ->String

Source
# File lib/prism/node.rb, line 9260defclosing_loclocation =@closing_locreturnlocationiflocation.is_a?(Location)@closing_loc =Location.new(source,location>>32,location&0xFFFFFFFF)end

attr_readerclosing_loc:Location

Source
# File lib/prism/node.rb, line 9184defcomment_targets  [*receiver,*call_operator_loc,opening_loc,*arguments,closing_loc,*block,operator_loc,value]#: Array[Prism::node | Location]end

defcomment_targets: () -> Array[Node | Location]

Source
# File lib/prism/node.rb, line 9174defcompact_child_nodescompact = []#: Array[Prism::node]compact<<receiverifreceivercompact<<argumentsifargumentscompact<<blockifblockcompact<<valuecompactend

defcompact_child_nodes: () ->Array

Source
# File lib/prism/node.rb, line 9189defcopy(node_id:self.node_id,location:self.location,flags:self.flags,receiver:self.receiver,call_operator_loc:self.call_operator_loc,opening_loc:self.opening_loc,arguments:self.arguments,closing_loc:self.closing_loc,block:self.block,operator_loc:self.operator_loc,value:self.value)IndexAndWriteNode.new(source,node_id,location,flags,receiver,call_operator_loc,opening_loc,arguments,closing_loc,block,operator_loc,value)end

def copy: (?node_id:Integer, ?location:Location, ?flags:Integer, ?receiver: Prism::node?, ?call_operator_loc:Location?, ?opening_loc:Location, ?arguments:ArgumentsNode?, ?closing_loc:Location, ?block:BlockArgumentNode?, ?operator_loc:Location, ?value: Prism::node) ->IndexAndWriteNode

def deconstruct: () ->Array

Alias for:child_nodes
Source
# File lib/prism/node.rb, line 9197defdeconstruct_keys(keys)  {node_id:node_id,location:location,receiver:receiver,call_operator_loc:call_operator_loc,opening_loc:opening_loc,arguments:arguments,closing_loc:closing_loc,block:block,operator_loc:operator_loc,value:value }end

defdeconstruct_keys: (Array keys) -> { node_id:Integer, location:Location, receiver: Prism::node?,call_operator_loc:Location?,opening_loc:Location, arguments:ArgumentsNode?,closing_loc:Location, block:BlockArgumentNode?,operator_loc:Location, value: Prism::node }

Source
# File lib/prism/node.rb, line 9217defignore_visibility?flags.anybits?(CallNodeFlags::IGNORE_VISIBILITY)end

def ignore_visibility?: () -> bool

Source
# File lib/prism/node.rb, line 9312definspectInspectVisitor.compose(self)end

def inspect ->String

Source
# File lib/prism/node.rb, line 9297defopeningopening_loc.sliceend

def opening: () ->String

Source
# File lib/prism/node.rb, line 9244defopening_loclocation =@opening_locreturnlocationiflocation.is_a?(Location)@opening_loc =Location.new(source,location>>32,location&0xFFFFFFFF)end

attr_readeropening_loc:Location

Source
# File lib/prism/node.rb, line 9307defoperatoroperator_loc.sliceend

def operator: () ->String

Source
# File lib/prism/node.rb, line 9276defoperator_loclocation =@operator_locreturnlocationiflocation.is_a?(Location)@operator_loc =Location.new(source,location>>32,location&0xFFFFFFFF)end

attr_readeroperator_loc:Location

Source
# File lib/prism/node.rb, line 9202defsafe_navigation?flags.anybits?(CallNodeFlags::SAFE_NAVIGATION)end

def safe_navigation?: () -> bool

Source
# File lib/prism/node.rb, line 9239defsave_call_operator_loc(repository)repository.enter(node_id,:call_operator_loc)unless@call_operator_loc.nil?end

Save thecall_operator_loc location using the given saved source so that it can be retrieved later.

Source
# File lib/prism/node.rb, line 9268defsave_closing_loc(repository)repository.enter(node_id,:closing_loc)end

Save theclosing_loc location using the given saved source so that it can be retrieved later.

Source
# File lib/prism/node.rb, line 9252defsave_opening_loc(repository)repository.enter(node_id,:opening_loc)end

Save theopening_loc location using the given saved source so that it can be retrieved later.

Source
# File lib/prism/node.rb, line 9284defsave_operator_loc(repository)repository.enter(node_id,:operator_loc)end

Save theoperator_loc location using the given saved source so that it can be retrieved later.

Source
# File lib/prism/node.rb, line 9317deftype:index_and_write_nodeend

Return a symbol representation of this node type. SeeNode#type.

Source
# File lib/prism/node.rb, line 9207defvariable_call?flags.anybits?(CallNodeFlags::VARIABLE_CALL)end

def variable_call?: () -> bool