source_location.rb 285 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# frozen_string_literal: true

module Inkoc
  class SourceLocation
    attr_reader :line, :column, :file

    def self.first_line(file)
      new(1, 1, file)
    end

    def initialize(line, column, file)
      @line = line
      @column = column
      @file = file
    end
  end
end