aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/scssphp/source-span/src/SourceLocation.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/scssphp/source-span/src/SourceLocation.php')
-rw-r--r--vendor/scssphp/source-span/src/SourceLocation.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/vendor/scssphp/source-span/src/SourceLocation.php b/vendor/scssphp/source-span/src/SourceLocation.php
new file mode 100644
index 000000000..99792350a
--- /dev/null
+++ b/vendor/scssphp/source-span/src/SourceLocation.php
@@ -0,0 +1,47 @@
+<?php
+
+namespace SourceSpan;
+
+use League\Uri\Contracts\UriInterface;
+
+interface SourceLocation
+{
+ public function getOffset(): int;
+
+ /**
+ * The 0-based line of that location
+ */
+ public function getLine(): int;
+
+ /**
+ * The 0-based column of that location
+ */
+ public function getColumn(): int;
+
+ public function getSourceUrl(): ?UriInterface;
+
+ /**
+ * Returns the distance in characters between $this and $other.
+ *
+ * This always returns a non-negative value.
+ *
+ * @return int<0, max>
+ */
+ public function distance(SourceLocation $other): int;
+
+ /**
+ * Returns a span that covers only a single point: this location.
+ */
+ public function pointSpan(): SourceSpan;
+
+ /**
+ * Compares two locations.
+ *
+ * It returns a negative integer if $this is ordered before $other,
+ * a positive integer if $this is ordered after $other,
+ * and zero if $this and $other are ordered together.
+ *
+ * $other must have the same source URL as $this.
+ */
+ public function compareTo(SourceLocation $other): int;
+}