Class: AdLint::ReplacedToken

Inherits:
Token
  • Object
show all
Defined in:
lib/adlint/token.rb

Instance Attribute Summary

Attributes inherited from Token

#location, #type, #type_hint, #value

Instance Method Summary collapse

Methods inherited from Token

#<=>

Methods included from LocationHolder

#analysis_target?

Constructor Details

#initialize(type, val, loc, type_hint = nil, no_further_repl = true) ⇒ ReplacedToken

Returns a new instance of ReplacedToken.



117
118
119
120
# File 'lib/adlint/token.rb', line 117

def initialize(type, val, loc, type_hint = nil, no_further_repl = true)
  super(type, val, loc, type_hint)
  @need_no_further_replacement = no_further_repl
end

Instance Method Details

#eql?(rhs_tok) ⇒ Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/adlint/token.rb', line 130

def eql?(rhs_tok)
  equal?(rhs_tok)
end

#hashObject



134
135
136
# File 'lib/adlint/token.rb', line 134

def hash
  object_id
end

#need_no_further_replacement?Boolean

Returns:

  • (Boolean)


122
123
124
# File 'lib/adlint/token.rb', line 122

def need_no_further_replacement?
  @need_no_further_replacement
end

#replaced?Boolean

Returns:

  • (Boolean)


126
127
128
# File 'lib/adlint/token.rb', line 126

def replaced?
  true
end