Exception: Layo::UnknownTokenError

Inherits:
SyntaxError
  • Object
show all
Defined in:
lib/layo/unknown_token_error.rb

Instance Attribute Summary

Attributes inherited from SyntaxError

#line, #pos

Instance Method Summary collapse

Methods inherited from SyntaxError

#to_s

Constructor Details

#initialize(lexeme) ⇒ UnknownTokenError

Returns a new instance of UnknownTokenError.



3
4
5
# File 'lib/layo/unknown_token_error.rb', line 3

def initialize(lexeme)
  super lexeme[1], lexeme[2], "Unknown token '#{lexeme[0]}'"
end