Exception: RLTK::HandledError

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

Overview

An error of this type is raised when the parser encountered a error that was handled by an error production.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors, result) ⇒ HandledError

Instantiate a new HandledError object with errors.

Parameters:

  • errors (Array<Object>)

    Errors added to the parsing environment by calls to Parser::Environment#error.

  • result (Object)

    Object resulting from parsing Tokens before the error occurred.



90
91
92
93
# File 'lib/rltk/parser.rb', line 90

def initialize(errors, result)
  @errors = errors
  @result = result
end

Instance Attribute Details

#errorsArray<Object> (readonly)

The errors as reported by the parser.

Returns:

  • (Array<Object>)


81
82
83
# File 'lib/rltk/parser.rb', line 81

def errors
  @errors
end

#resultObject (readonly)

The result that would have been returned by the call to parse.



84
85
86
# File 'lib/rltk/parser.rb', line 84

def result
  @result
end