aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/scssphp/source-span/src/Highlighter/Line.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/scssphp/source-span/src/Highlighter/Line.php')
-rw-r--r--vendor/scssphp/source-span/src/Highlighter/Line.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/vendor/scssphp/source-span/src/Highlighter/Line.php b/vendor/scssphp/source-span/src/Highlighter/Line.php
new file mode 100644
index 000000000..0dc800c38
--- /dev/null
+++ b/vendor/scssphp/source-span/src/Highlighter/Line.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace SourceSpan\Highlighter;
+
+/**
+ * A single line of the source file being highlighted.
+ *
+ * @internal
+ */
+final class Line
+{
+ /**
+ * All highlights that cover any portion of this line, in source span order.
+ *
+ * This is populated after the initial line is created.
+ *
+ * @var list<Highlight>
+ */
+ public array $highlights = [];
+
+ /**
+ * The URL of the source file in which this line appears.
+ *
+ * For lines created from spans without an explicit URL, this is an opaque
+ * object that differs between lines that come from different spans.
+ */
+ public readonly object $url;
+
+
+ /**
+ * @param int $number The O-based line number in the source file
+ */
+ public function __construct(
+ public readonly string $text,
+ public readonly int $number,
+ object $url,
+ ) {
+ $this->url = $url;
+ }
+}