Exception: Flor::ParseError
- Inherits:
-
StandardError
- Object
- StandardError
- Flor::ParseError
- Defined in:
- lib/flor/parser.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#fname ⇒ Object
readonly
Returns the value of attribute fname.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#visual ⇒ Object
readonly
Returns the value of attribute visual.
Instance Method Summary collapse
-
#initialize(error_array, fname) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(error_array, fname) ⇒ ParseError
Returns a new instance of ParseError.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/flor/parser.rb', line 27 def initialize(error_array, fname) #puts "-" * 80; p error_array; puts error_array.last; puts "-" * 80 @line, @column, @offset, @msg, @visual = error_array @fname = fname m = "syntax error at line #{@line} column #{@column}" m += " in #{fname}" if fname super(m) end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
25 26 27 |
# File 'lib/flor/parser.rb', line 25 def column @column end |
#fname ⇒ Object (readonly)
Returns the value of attribute fname.
25 26 27 |
# File 'lib/flor/parser.rb', line 25 def fname @fname end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
25 26 27 |
# File 'lib/flor/parser.rb', line 25 def line @line end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
25 26 27 |
# File 'lib/flor/parser.rb', line 25 def msg @msg end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
25 26 27 |
# File 'lib/flor/parser.rb', line 25 def offset @offset end |
#visual ⇒ Object (readonly)
Returns the value of attribute visual.
25 26 27 |
# File 'lib/flor/parser.rb', line 25 def visual @visual end |