Class: Dhaka::ParseErrorResult
- Inherits:
-
Object
- Object
- Dhaka::ParseErrorResult
- Defined in:
- lib/dhaka/parser/parse_result.rb
Overview
Returned on unsuccessful parsing of the input token stream.
Instance Attribute Summary collapse
-
#parser_state ⇒ Object
readonly
Returns the value of attribute parser_state.
-
#unexpected_token ⇒ Object
readonly
Returns the value of attribute unexpected_token.
Instance Method Summary collapse
-
#has_error? ⇒ Boolean
This is true.
-
#initialize(unexpected_token, parser_state) ⇒ ParseErrorResult
constructor
:nodoc:.
-
#inspect ⇒ Object
:nodoc:.
Constructor Details
#initialize(unexpected_token, parser_state) ⇒ ParseErrorResult
:nodoc:
32 33 34 35 |
# File 'lib/dhaka/parser/parse_result.rb', line 32 def initialize(unexpected_token, parser_state) #:nodoc: @unexpected_token = unexpected_token @parser_state = parser_state end |
Instance Attribute Details
#parser_state ⇒ Object (readonly)
Returns the value of attribute parser_state.
30 31 32 |
# File 'lib/dhaka/parser/parse_result.rb', line 30 def parser_state @parser_state end |
#unexpected_token ⇒ Object (readonly)
Returns the value of attribute unexpected_token.
30 31 32 |
# File 'lib/dhaka/parser/parse_result.rb', line 30 def unexpected_token @unexpected_token end |
Instance Method Details
#has_error? ⇒ Boolean
This is true.
38 39 40 |
# File 'lib/dhaka/parser/parse_result.rb', line 38 def has_error? true end |
#inspect ⇒ Object
:nodoc:
42 43 44 |
# File 'lib/dhaka/parser/parse_result.rb', line 42 def inspect #:nodoc: "<Dhaka::ParseErrorResult unexpected_token=#{unexpected_token.inspect}>" end |