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
-
#unexpected_token ⇒ Object
readonly
The token that caused the parse error.
Instance Method Summary collapse
-
#has_error? ⇒ Boolean
This is true.
-
#initialize(unexpected_token) ⇒ ParseErrorResult
constructor
:nodoc:.
Constructor Details
#initialize(unexpected_token) ⇒ ParseErrorResult
:nodoc:
21 22 23 |
# File 'lib/parser/parse_result.rb', line 21 def initialize(unexpected_token) #:nodoc: @unexpected_token = unexpected_token end |
Instance Attribute Details
#unexpected_token ⇒ Object (readonly)
The token that caused the parse error.
20 21 22 |
# File 'lib/parser/parse_result.rb', line 20 def unexpected_token @unexpected_token end |
Instance Method Details
#has_error? ⇒ Boolean
This is true.
25 26 27 |
# File 'lib/parser/parse_result.rb', line 25 def has_error? true end |