Class: Lex::SourceLine
- Inherits:
-
Object
- Object
- Lex::SourceLine
- Defined in:
- lib/lex/source_line.rb
Overview
Lexer tokens’ source line
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(line = 1, column = 1) ⇒ SourceLine
constructor
A new instance of SourceLine.
Constructor Details
#initialize(line = 1, column = 1) ⇒ SourceLine
Returns a new instance of SourceLine.
8 9 10 11 |
# File 'lib/lex/source_line.rb', line 8 def initialize(line = 1, column = 1) @line = line @column = column end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
6 7 8 |
# File 'lib/lex/source_line.rb', line 6 def column @column end |
#line ⇒ Object
Returns the value of attribute line.
6 7 8 |
# File 'lib/lex/source_line.rb', line 6 def line @line end |