summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_location.rb
blob: 19a4d32850d963d818c55797b4cbe986d9bdbd6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

module Sass
  module Logger
    # A specific location within a source file.
    #
    # This is always associated with a {SourceSpan} which indicates which file it refers to.
    #
    # @see https://sass-lang.com/documentation/js-api/interfaces/sourcelocation/
    class SourceLocation
      # @return [Integer]
      attr_reader :offset, :line, :column

      # @!visibility private
      def initialize(source_location)
        @offset = source_location.offset
        @line = source_location.line
        @column = source_location.column
      end
    end
  end
end