Class: Dhaka::ParseErrorResult
- Inherits:
-
Object
- Object
- Dhaka::ParseErrorResult
- Defined in:
- lib/parser/parse_result.rb
Overview
Returned on unsuccessful parsing of the input token stream.
Instance Attribute Summary collapse
-
#bad_token_index ⇒ Object
readonly
The index of the token that caused the parse error.
Instance Method Summary collapse
-
#has_error? ⇒ Boolean
This is true.
-
#initialize(bad_token_index) ⇒ ParseErrorResult
constructor
:nodoc:.
Constructor Details
#initialize(bad_token_index) ⇒ ParseErrorResult
:nodoc:
19 20 21 |
# File 'lib/parser/parse_result.rb', line 19 def initialize(bad_token_index) #:nodoc: @bad_token_index = bad_token_index end |
Instance Attribute Details
#bad_token_index ⇒ Object (readonly)
The index of the token that caused the parse error.
18 19 20 |
# File 'lib/parser/parse_result.rb', line 18 def bad_token_index @bad_token_index end |
Instance Method Details
#has_error? ⇒ Boolean
This is true.
23 24 25 |
# File 'lib/parser/parse_result.rb', line 23 def has_error? true end |