Class: Prism::LexCompat::IgnoredNewlineToken
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Token ,
SimpleDelegator
|
|
Instance Chain:
self,
Token ,
SimpleDelegator
|
|
Inherits: |
Prism::LexCompat::Token
|
Defined in: | lib/prism/lex_compat.rb |
Overview
Ignored newlines can occasionally have a LABEL state attached to them, so we compare the state differently here.
Instance Method Summary
- #==(other) Internal use only
Token
- Inherited
Instance Method Details
#==(other)
This method is for internal use only.
[ GitHub ]
# File 'lib/prism/lex_compat.rb', line 240
def ==(other) # :nodoc: return false unless self[0...-1] == other[0...-1] if self[4] == Ripper::EXPR_ARG | Ripper::EXPR_LABELED other[4] & Ripper::EXPR_ARG | Ripper::EXPR_LABELED > 0 else self[4] == other[4] end end