Class: Taoism::Lexer::ErrorHandler
- Inherits:
-
Object
- Object
- Taoism::Lexer::ErrorHandler
- Defined in:
- lib/taoism/lexer.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #add(code, message = "", pos = nil) ⇒ Object
-
#initialize ⇒ ErrorHandler
constructor
A new instance of ErrorHandler.
Constructor Details
#initialize ⇒ ErrorHandler
Returns a new instance of ErrorHandler.
262 263 264 |
# File 'lib/taoism/lexer.rb', line 262 def initialize @errors = [] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
260 261 262 |
# File 'lib/taoism/lexer.rb', line 260 def errors @errors end |
Instance Method Details
#add(code, message = "", pos = nil) ⇒ Object
266 267 268 |
# File 'lib/taoism/lexer.rb', line 266 def add(code, = "", pos = nil) @errors << LexicalError.new(code, , pos) end |