class CodeRay::Scanners::Scanner

def raise_inspect msg, tokens, state = self.state || 'No state given!', ambit = 30, backtrace = caller

Scanner error with additional status information
def raise_inspect msg, tokens, state = self.state || 'No state given!', ambit = 30, backtrace = caller
  raise ScanError, <<-EOE % [
OR in %s: %s (after %d tokens)
:
t line: %d  column: %d  pos: %d
d: %p  state: %p
 %p,  eos? = %p
nding code:
  %p
OR***
  EOE
    File.basename(caller[0]),
    msg,
    tokens.respond_to?(:size) ? tokens.size : 0,
    tokens.respond_to?(:last) ? tokens.last(10).map { |t| t.inspect }.join("\n") : '',
    line, column, pos,
    matched, state, bol?, eos?,
    binary_string[pos - ambit, ambit],
    binary_string[pos, ambit],
  ], backtrace
end