123456789_123456789_123456789_123456789_123456789_

Class: Prism::LexCompat::EndContentToken

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

Ripper doesn’t include the rest of the token in the event, so we need to trim it down to just the content on the first line when comparing.

Instance Method Summary

Token - Inherited

#event

The type of the token.

#location

The location of the token in the source.

#state

The state of the lexer when this token was produced.

#value

The slice of the source that this token represents.

Instance Method Details

#==(other)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/prism/lex_compat.rb', line 211

def ==(other) # :nodoc:
  [self[0], self[1], self[2][0..self[2].index("\n")], self[3]] == other
end