Exception: RPrec::ParseError
- Defined in:
- lib/rprec/parse_error.rb
Overview
ParseError
is an error on parsing.
Instance Attribute Summary collapse
- #loc ⇒ Range? readonly
Instance Method Summary collapse
-
#initialize(message, loc: nil) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(message, loc: nil) ⇒ ParseError
Returns a new instance of ParseError.
8 9 10 11 12 |
# File 'lib/rprec/parse_error.rb', line 8 def initialize(, loc: nil) = loc ? "#{} at #{loc}" : @loc = loc super() end |
Instance Attribute Details
#loc ⇒ Range? (readonly)
17 18 19 |
# File 'lib/rprec/parse_error.rb', line 17 def loc @loc end |