class Scribble::Parsing::Reporter

Constants

Cause

Public Instance Methods

err(atom, source, message, children = nil) click to toggle source
# File lib/scribble/parsing/reporter.rb, line 57
def err atom, source, message, children = nil
  err_at atom, source, message, source.pos, children
end
err_at(atom, source, message, position, children = nil) click to toggle source
# File lib/scribble/parsing/reporter.rb, line 61
def err_at atom, source, message, position, children = nil
  if @position.nil? || position > @position
    @position = position
    @cause = Cause.new source, position
  end
  @cause.strings << atom.str if position == @position && atom.respond_to?(:str)
  @cause
end