Exception: Rbexy::Lexer::SyntaxError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rbexy/lexer.rb

Instance Method Summary collapse

Constructor Details

#initialize(lexer) ⇒ SyntaxError

Returns a new instance of SyntaxError.



4
5
6
7
8
9
10
# File 'lib/rbexy/lexer.rb', line 4

def initialize(lexer)
  super(
    "Invalid syntax: `#{lexer.scanner.peek(20)}`\n" +
    "Stack: #{lexer.stack}\n" +
    "Tokens: #{lexer.tokens}"
  )
end