123456789_123456789_123456789_123456789_123456789_

Class: Prism::LocalVariableWriteNode

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Node
Instance Chain:
self, Node
Inherits: Prism::Node
Defined in: lib/prism/parse_result/newlines.rb

Overview

The line event for a statement is emitted where its first instruction is compiled, so nodes whose first instruction comes from a sub-expression delegate their newline flag to that sub-expression: assignments to their value, calls to their receiver, and array, hash, and interpolated string literals to their first element. Static literals are the exception: they are compiled to a single instruction on the first line of the literal, so they do not delegate.

Instance Attribute Summary

Node - Inherited

#newline_flag?

: () -> bool.

Instance Method Summary

Node - Inherited

#deprecated

: (*String replacements) -> void.

#newline_flag!

: (Array lines) -> void.

Instance Method Details

#newline_flag!(lines)

This method is for internal use only.

: (Array lines) -> void

[ GitHub ]

  
# File 'lib/prism/parse_result/newlines.rb', line 298

def newline_flag!(lines) # :nodoc:
  value.newline_flag!(lines)
end