Exception: PackratParser::ParseError
- Inherits:
-
StandardError
- Object
- StandardError
- PackratParser::ParseError
- Defined in:
- lib/packrat_parser/result.rb
Overview
Raised by PackratParser#parse when the input cannot be parsed, or when the start symbol succeeds but does not consume the whole input.
Instance Attribute Summary collapse
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
Instance Method Summary collapse
-
#initialize(message, pos) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(message, pos) ⇒ ParseError
Returns a new instance of ParseError.
48 49 50 51 |
# File 'lib/packrat_parser/result.rb', line 48 def initialize(, pos) @pos = pos super("#{} (at position #{pos})") end |
Instance Attribute Details
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
46 47 48 |
# File 'lib/packrat_parser/result.rb', line 46 def pos @pos end |