class Minilex::UnrecognizedInput

The error raised when a Lexer can't match some input

It will show the offending characters and tell you where in the input it was when it got confused.

Attributes

pos[R]
scanner[R]

Public Class Methods

new(scanner, pos) click to toggle source
# File lib/minilex.rb, line 132
def initialize(scanner, pos)
  @scanner = scanner
  @pos = pos
end

Public Instance Methods

to_s() click to toggle source
# File lib/minilex.rb, line 137
def to_s
  "\"#{scanner.peek(10)}\" at line:#{pos.line}, offset:#{pos.offset}"
end