Class: SystemRDL::Parser::Position
- Inherits:
-
Object
- Object
- SystemRDL::Parser::Position
- Defined in:
- lib/systemrdl/parser/token.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(filename, line, column) ⇒ Position
constructor
A new instance of Position.
- #to_s ⇒ Object
Constructor Details
#initialize(filename, line, column) ⇒ Position
Returns a new instance of Position.
6 7 8 9 10 11 |
# File 'lib/systemrdl/parser/token.rb', line 6 def initialize(filename, line, column) @filename = filename @line = line @column = column freeze end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
15 16 17 |
# File 'lib/systemrdl/parser/token.rb', line 15 def column @column end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
13 14 15 |
# File 'lib/systemrdl/parser/token.rb', line 13 def filename @filename end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
14 15 16 |
# File 'lib/systemrdl/parser/token.rb', line 14 def line @line end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/systemrdl/parser/token.rb', line 17 def to_s "filename: #{filename} line: #{line} column: #{column}" end |