Class: Rley::Lexical::Position
- Inherits:
-
Struct
- Object
- Struct
- Rley::Lexical::Position
- Defined in:
- lib/rley/lexical/token.rb
Overview
A Position is the location of a lexeme within a source file.
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
8 9 10 |
# File 'lib/rley/lexical/token.rb', line 8 def column @column end |
#line ⇒ Object
Returns the value of attribute line
8 9 10 |
# File 'lib/rley/lexical/token.rb', line 8 def line @line end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/rley/lexical/token.rb', line 9 def to_s "line #{line}, column #{column}" end |