Exception: EBNF::PEG::Parser::Error
- Defined in:
- vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/peg/parser.rb
Overview
Raised for errors during parsing.
Instance Attribute Summary collapse
-
#lineno ⇒ Integer
readonly
The line number where the error occurred.
-
#production ⇒ Symbol
readonly
The current production.
-
#rest ⇒ String
readonly
The read head when scanning failed.
Instance Method Summary collapse
-
#initialize(message, **options) ⇒ Error
constructor
Initializes a new lexer error instance.
Constructor Details
#initialize(message, **options) ⇒ Error
Initializes a new lexer error instance.
575 576 577 578 579 580 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/peg/parser.rb', line 575 def initialize(, **) @production = [:production] @rest = [:rest] @lineno = [:lineno] super(.to_s) end |
Instance Attribute Details
#lineno ⇒ Integer (readonly)
The line number where the error occurred.
565 566 567 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/peg/parser.rb', line 565 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
553 554 555 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/peg/parser.rb', line 553 def production @production end |
#rest ⇒ String (readonly)
The read head when scanning failed
559 560 561 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ebnf-c8f40958c6c3/lib/ebnf/peg/parser.rb', line 559 def rest @rest end |