Sha256: b686e11dedbe4d24270e4ddd2f6164f4c04921048f0e25f83504a283ac978d87

Contents?: true

Size: 614 Bytes

Versions: 3

Compression:

Stored size: 614 Bytes

Contents

module Lrama
  class Lexer
    class Location
      attr_reader :first_line, :first_column, :last_line, :last_column

      def initialize(first_line:, first_column:, last_line:, last_column:)
        @first_line = first_line
        @first_column = first_column
        @last_line = last_line
        @last_column = last_column
      end

      def ==(other)
        self.class == other.class &&
        self.first_line == other.first_line &&
        self.first_column == other.first_column &&
        self.last_line == other.last_line &&
        self.last_column == other.last_column
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lrama-0.5.12 lib/lrama/lexer/location.rb
lrama-0.5.11 lib/lrama/lexer/location.rb
lrama-0.5.10 lib/lrama/lexer/location.rb