Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Source Span Laravel Package

scssphp/source-span

scssphp/source-span is a small PHP utility for tracking and working with source code spans (start/end positions) used by scssphp and related tooling. Useful for mapping errors, locations, and ranges back to the original source during parsing and compilation.

View on GitHub
Deep Wiki
Context7

SourceSpan

scssphp/source-span is a library for tracking locations in source code. It's designed to provide a standard representation for source code locations and spans so that disparate packages can easily pass them among one another, and to make it easy to generate human-friendly messages associated with a given piece of code.

The most commonly-used interface is the package's namesake, SourceSpan\SourceSpan. It represents a span of characters in some source file, and is often attached to an object that has been parsed to indicate where it was parsed from. It provides access to the text of the span via SourceSpan::getText() and can be used to produce human-friendly messages using SourceSpan::message(). It's most simple implementation is SourceSpan\SimpleSourceSpan which holds directly the span information.

When parsing code from a file, SourceSpan\SourceFile is useful. Not only does it provide an efficient means of computing line and column numbers, SourceFile#span() returns special FileSpans that are able to provide more context for their error messages.

Credits

This library is a PHP port of the Dart source_span package.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky