Exception: JsxRosetta::IR::Lowering::LoweringError
- Defined in:
- lib/jsx_rosetta/ir/lowering.rb
Overview
A failure during AST → IR lowering. Carries optional line/column information when the failure can be tied to an AST node.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(message, node: nil, source: nil) ⇒ LoweringError
constructor
A new instance of LoweringError.
Constructor Details
#initialize(message, node: nil, source: nil) ⇒ LoweringError
Returns a new instance of LoweringError.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/jsx_rosetta/ir/lowering.rb', line 33 def initialize(, node: nil, source: nil) @line = nil @column = nil if node && source && node.start_pos @line, @column = compute_line_column(source, node.start_pos) = "#{} (at line #{@line}, column #{@column})" end super() end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
31 32 33 |
# File 'lib/jsx_rosetta/ir/lowering.rb', line 31 def column @column end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
31 32 33 |
# File 'lib/jsx_rosetta/ir/lowering.rb', line 31 def line @line end |