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.



73
74
75
76
# File 'lib/rltk/parser.rb', line 73

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>)


64
65
66
# File 'lib/rltk/parser.rb', line 64

def errors
  @errors
end

#resultObject (readonly)

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



67
68
69
# File 'lib/rltk/parser.rb', line 67

def result
  @result
end