summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger')
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/silent.rb28
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_location.rb22
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_span.rb28
3 files changed, 78 insertions, 0 deletions
diff --git a/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/silent.rb b/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/silent.rb
new file mode 100644
index 0000000..f090efa
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/silent.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+module Sass
+ # A namespace for built-in Loggers.
+ #
+ # @see https://sass-lang.com/documentation/js-api/modules/logger/
+ module Logger
+ module_function
+
+ # A Logger that silently ignores all warnings and debug messages.
+ #
+ # @see https://sass-lang.com/documentation/js-api/variables/logger.silent/
+ def silent
+ Silent
+ end
+
+ # A Logger that silently ignores all warnings and debug messages.
+ module Silent
+ module_function
+
+ def warn(message, options); end
+
+ def debug(message, options); end
+ end
+
+ private_constant :Silent
+ end
+end
diff --git a/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_location.rb b/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_location.rb
new file mode 100644
index 0000000..19a4d32
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_location.rb
@@ -0,0 +1,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
diff --git a/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_span.rb b/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_span.rb
new file mode 100644
index 0000000..3f22ca3
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/sass-embedded-1.89.2-arm64-darwin/lib/sass/logger/source_span.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+module Sass
+ module Logger
+ # A span of text within a source file.
+ #
+ # @see https://sass-lang.com/documentation/js-api/interfaces/sourcespan/
+ class SourceSpan
+ # @return [SourceLocation]
+ attr_reader :start, :end
+
+ # @return [String]
+ attr_reader :text
+
+ # @return [String, nil]
+ attr_reader :url, :context
+
+ # @!visibility private
+ def initialize(source_span)
+ @start = source_span.start.nil? ? nil : Logger::SourceLocation.new(source_span.start)
+ @end = source_span.end.nil? ? nil : Logger::SourceLocation.new(source_span.end)
+ @text = source_span.text
+ @url = source_span.url == '' ? nil : source_span.url
+ @context = source_span.context == '' ? nil : source_span.context
+ end
+ end
+ end
+end