Class: Graphlyte::Lexing::Position

Inherits:
Struct
  • Object
show all
Defined in:
lib/graphlyte/lexing/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#colObject

Returns the value of attribute col

Returns:

  • (Object)

    the current value of col



5
6
7
# File 'lib/graphlyte/lexing/location.rb', line 5

def col
  @col
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



5
6
7
# File 'lib/graphlyte/lexing/location.rb', line 5

def line
  @line
end

Instance Method Details

#to_sObject



6
7
8
# File 'lib/graphlyte/lexing/location.rb', line 6

def to_s
  "#{line}:#{col}"
end