{"id":28398616,"url":"https://github.com/scssphp/source-span","last_synced_at":"2025-06-28T18:32:15.979Z","repository":{"id":267329196,"uuid":"900912031","full_name":"scssphp/source-span","owner":"scssphp","description":"Provides a representation for source code locations and spans.","archived":false,"fork":false,"pushed_at":"2024-12-09T23:39:27.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-01T13:54:01.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scssphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-09T17:42:10.000Z","updated_at":"2025-01-06T09:26:28.000Z","dependencies_parsed_at":"2024-12-09T18:39:52.147Z","dependency_job_id":"c6caf656-fa71-4a8c-a507-387699d57aac","html_url":"https://github.com/scssphp/source-span","commit_stats":null,"previous_names":["scssphp/source-span"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scssphp/source-span","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssphp%2Fsource-span","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssphp%2Fsource-span/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssphp%2Fsource-span/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssphp%2Fsource-span/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scssphp","download_url":"https://codeload.github.com/scssphp/source-span/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scssphp%2Fsource-span/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262476267,"owners_count":23317243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-01T05:38:52.313Z","updated_at":"2025-06-28T18:32:15.974Z","avatar_url":"https://github.com/scssphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SourceSpan\n\n`scssphp/source-span` is a library for tracking locations in source code. It's designed\nto provide a standard representation for source code locations and spans so that\ndisparate packages can easily pass them among one another, and to make it easy\nto generate human-friendly messages associated with a given piece of code.\n\nThe most commonly-used interface is the package's namesake, `SourceSpan\\SourceSpan`. It\nrepresents a span of characters in some source file, and is often attached to an\nobject that has been parsed to indicate where it was parsed from. It provides\naccess to the text of the span via `SourceSpan::getText()` and can be used to produce\nhuman-friendly messages using `SourceSpan::message()`. It's most simple implementation\nis `SourceSpan\\SimpleSourceSpan` which holds directly the span information.\n\nWhen parsing code from a file, `SourceSpan\\SourceFile` is useful. Not only does it provide\nan efficient means of computing line and column numbers, `SourceFile#span()`\nreturns special `FileSpan`s that are able to provide more context for their\nerror messages.\n\n## Credits\n\nThis library is a PHP port of the [Dart `source_span` package](https://github.com/dart-lang/source_span).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscssphp%2Fsource-span","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscssphp%2Fsource-span","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscssphp%2Fsource-span/lists"}