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,
sig/ibex/frontend/source_cursor.rbs,
sig/ibex/frontend/source_cursor.rbs
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.
Class Method Summary collapse
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 |
Class Method Details
.new(file:, line:, column:) ⇒ instance .new(arg0) ⇒ instance
13 14 |
# File 'sig/ibex/frontend/source_cursor.rbs', line 13
def self.new: (?file: String, ?line: Integer, ?column: Integer) -> instance
| ({ ?file: String, ?line: Integer, ?column: Integer }) -> instance
|
Instance Method Details
#to_h ⇒ IR::location
15 16 17 |
# File 'lib/ibex/frontend/source_cursor.rb', line 15 def to_h { file: file, line: line, column: column } end |
#to_s ⇒ String
20 21 22 |
# File 'lib/ibex/frontend/source_cursor.rb', line 20 def to_s "#{file}:#{line}:#{column}" end |