Class: Ibex::Frontend::Location
- Inherits:
-
Struct
- Object
- Struct
- Ibex::Frontend::Location
- Defined in:
- lib/ibex/frontend/source_cursor.rb,
lib/ibex/frontend/source_cursor.rb
Overview
A source coordinate retained by frontend and IR objects.
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#file ⇒ Object
Returns the value of attribute file.
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
6 7 8 |
# File 'lib/ibex/frontend/source_cursor.rb', line 6 def column @column end |
#file ⇒ Object
Returns the value of attribute file
6 7 8 |
# File 'lib/ibex/frontend/source_cursor.rb', line 6 def file @file end |
#line ⇒ Object
Returns the value of attribute line
6 7 8 |
# File 'lib/ibex/frontend/source_cursor.rb', line 6 def line @line end |
Instance Method Details
#to_h ⇒ Object
15 16 17 |
# File 'lib/ibex/frontend/source_cursor.rb', line 15 def to_h { file: file, line: line, column: column } end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/ibex/frontend/source_cursor.rb', line 20 def to_s "#{file}:#{line}:#{column}" end |