Class: Dhaka::ParseErrorResult

Inherits:
Object
  • Object
show all
Defined in:
lib/parser/parse_result.rb

Overview

Returned on unsuccessful parsing of the input token stream.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_indexObject (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.

Returns:

  • (Boolean)


23
24
25
# File 'lib/parser/parse_result.rb', line 23

def has_error? 
  true
end