Class: Treetop::Runtime::TerminalParseFailure
- Defined in:
- lib/gems/treetop-1.2.4/lib/treetop/runtime/terminal_parse_failure.rb
Instance Attribute Summary collapse
-
#expected_string ⇒ Object
readonly
Returns the value of attribute expected_string.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Instance Method Summary collapse
-
#initialize(index, expected_string) ⇒ TerminalParseFailure
constructor
A new instance of TerminalParseFailure.
- #to_s ⇒ Object
Constructor Details
#initialize(index, expected_string) ⇒ TerminalParseFailure
Returns a new instance of TerminalParseFailure.
6 7 8 9 |
# File 'lib/gems/treetop-1.2.4/lib/treetop/runtime/terminal_parse_failure.rb', line 6 def initialize(index, expected_string) @index = index @expected_string = expected_string end |
Instance Attribute Details
#expected_string ⇒ Object (readonly)
Returns the value of attribute expected_string.
4 5 6 |
# File 'lib/gems/treetop-1.2.4/lib/treetop/runtime/terminal_parse_failure.rb', line 4 def expected_string @expected_string end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
4 5 6 |
# File 'lib/gems/treetop-1.2.4/lib/treetop/runtime/terminal_parse_failure.rb', line 4 def index @index end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/gems/treetop-1.2.4/lib/treetop/runtime/terminal_parse_failure.rb', line 11 def to_s "String matching #{expected_string} expected." end |