Class: Dhaka::TokenizerErrorResult
- Inherits:
-
Object
- Object
- Dhaka::TokenizerErrorResult
- Defined in:
- lib/dhaka/tokenizer/tokenizer.rb
Overview
Returned when tokenizing fails due to an unexpected character in the input stream.
Instance Attribute Summary collapse
-
#unexpected_char_index ⇒ Object
readonly
The index of the character that caused the error.
Instance Method Summary collapse
-
#has_error? ⇒ Boolean
Returns true.
-
#initialize(unexpected_char_index) ⇒ TokenizerErrorResult
constructor
A new instance of TokenizerErrorResult.
Constructor Details
#initialize(unexpected_char_index) ⇒ TokenizerErrorResult
Returns a new instance of TokenizerErrorResult.
29 30 31 |
# File 'lib/dhaka/tokenizer/tokenizer.rb', line 29 def initialize(unexpected_char_index) @unexpected_char_index = unexpected_char_index end |
Instance Attribute Details
#unexpected_char_index ⇒ Object (readonly)
The index of the character that caused the error.
27 28 29 |
# File 'lib/dhaka/tokenizer/tokenizer.rb', line 27 def unexpected_char_index @unexpected_char_index end |
Instance Method Details
#has_error? ⇒ Boolean
Returns true.
34 35 36 |
# File 'lib/dhaka/tokenizer/tokenizer.rb', line 34 def has_error? true end |