Exception: Rbexy::Lexer::SyntaxError
- Inherits:
-
StandardError
- Object
- StandardError
- Rbexy::Lexer::SyntaxError
- Defined in:
- lib/rbexy/lexer.rb
Instance Method Summary collapse
-
#initialize(lexer) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
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 |