scssphp/source-span
Tiny PHP utility used by scssphp to track and report source spans/locations in parsed code. Helps map errors, warnings, and generated output back to the original input with line/column precision for better debugging and tooling.
scssphp/scssphp but can be used independently for tooling, diagnostics, or custom SCSS/Sass compilers.composer require scssphp/source-span.SourceSpan and SourceFile. A SourceSpan represents a contiguous slice of text in a SourceFile, with start/end positions (line/column-based).SourceFile::create() to represent a source file by name and contents.SourceSpan objects via SourceSpan::create($file, $start, $end) — positions are Position objects (with line, column, byteOffset).SourceSpan instances alongside error messages (e.g., in custom Sass functions or custom rule linters).@error messages or IDE language server integrations).SourceSpan can be mapped to original sources using position remapping logic.SourceSpan is immutable — always create new instances when positions change.line and column indices — verify alignment with your parser or editor (many tools use 0-based internally, leading to off-by-one bugs).SourceSpan::toString() returns the substring content; use getSourceCode() to access full source if needed.php-http/message-factory for HTTP diagnostics).SourceFile instances across multiple compilations.How can I help you explore Laravel packages today?