Class: UnexpectedTokenError
- Inherits:
-
CompilerError
- Object
- CompilerError
- UnexpectedTokenError
- Defined in:
- lib/compiler_error.rb
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(token) ⇒ UnexpectedTokenError
constructor
A new instance of UnexpectedTokenError.
Methods inherited from CompilerError
Constructor Details
#initialize(token) ⇒ UnexpectedTokenError
182 183 184 185 186 |
# File 'lib/compiler_error.rb', line 182 def initialize token super token.position @type = token.type @value = token.value end |
Instance Method Details
#info ⇒ Object
188 189 190 |
# File 'lib/compiler_error.rb', line 188 def info "unexpected #{@type.to_s.downcase} : '#{@value}'" end |