Exception: Voodoo::Parser::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Voodoo::Parser::Error
- Defined in:
- lib/voodoo/parser.rb
Overview
Base class for errors reported from the parser. This provides methods to get the name of the input being processed, as well as the start_line, start_column, and text of the code that triggered the error.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#input_name ⇒ Object
readonly
Returns the value of attribute input_name.
-
#start_column ⇒ Object
readonly
Returns the value of attribute start_column.
-
#start_line ⇒ Object
readonly
Returns the value of attribute start_line.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(message, input_name, start_line, start_column, text) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, input_name, start_line, start_column, text) ⇒ Error
Returns a new instance of Error.
45 46 47 48 49 50 51 |
# File 'lib/voodoo/parser.rb', line 45 def initialize , input_name, start_line, start_column, text super @input_name = input_name @start_line = start_line @start_column = start_column @text = text end |
Instance Attribute Details
#input_name ⇒ Object (readonly)
Returns the value of attribute input_name.
53 54 55 |
# File 'lib/voodoo/parser.rb', line 53 def input_name @input_name end |
#start_column ⇒ Object (readonly)
Returns the value of attribute start_column.
53 54 55 |
# File 'lib/voodoo/parser.rb', line 53 def start_column @start_column end |
#start_line ⇒ Object (readonly)
Returns the value of attribute start_line.
53 54 55 |
# File 'lib/voodoo/parser.rb', line 53 def start_line @start_line end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
53 54 55 |
# File 'lib/voodoo/parser.rb', line 53 def text @text end |