Class: Scribble::Parsing::Reporter
- Inherits:
-
Object
- Object
- Scribble::Parsing::Reporter
- Defined in:
- lib/scribble/parsing/reporter.rb
Defined Under Namespace
Classes: Cause
Instance Method Summary collapse
- #err(atom, source, message, children = nil) ⇒ Object
- #err_at(atom, source, message, position, children = nil) ⇒ Object
Instance Method Details
#err(atom, source, message, children = nil) ⇒ Object
57 58 59 |
# File 'lib/scribble/parsing/reporter.rb', line 57 def err atom, source, , children = nil err_at atom, source, , source.pos, children end |
#err_at(atom, source, message, position, children = nil) ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/scribble/parsing/reporter.rb', line 61 def err_at atom, source, , 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 |