omy.Utils.Parser.Source
2.0.0-rc.1
dotnet add package omy.Utils.Parser.Source --version 2.0.0-rc.1
NuGet\Install-Package omy.Utils.Parser.Source -Version 2.0.0-rc.1
<PackageReference Include="omy.Utils.Parser.Source" Version="2.0.0-rc.1" />
<PackageVersion Include="omy.Utils.Parser.Source" Version="2.0.0-rc.1" />
<PackageReference Include="omy.Utils.Parser.Source" />
paket add omy.Utils.Parser.Source --version 2.0.0-rc.1
#r "nuget: omy.Utils.Parser.Source, 2.0.0-rc.1"
#:package omy.Utils.Parser.Source@2.0.0-rc.1
#addin nuget:?package=omy.Utils.Parser.Source&version=2.0.0-rc.1&prerelease
#tool nuget:?package=omy.Utils.Parser.Source&version=2.0.0-rc.1&prerelease
omy.Utils.Parser.Source
omy.Utils.Parser.Source contains shared source-location contracts for the Utils.Parser ecosystem.
The package is intentionally small. It does not contain runtime parsing logic, parser logic, diagnostic emission logic, generator logic, or tooling behavior. It only provides reusable source-coordinate contracts that parser runtime components, diagnostics, generators, and tooling can reference without introducing artificial package coupling.
Runtime source coordinates
Runtime source coordinates describe technical positions in the source text consumed by lexer, parser, and runtime components.
SourceLocationrepresents a point in source text.SourceSpanrepresents a range in source text.
These contracts are intended for tokens, parse nodes, lexer/parser runtime observation, runtime analyses, and source-text slicing.
For runtime coordinates:
Positionis a zero-based absolute offset in the source string.Lengthis a length in characters/runtime text units according to the source representation used by the runtime.LineandColumnare 1-based display coordinates associated with the same point or span start.FilePathis optional because source text can be anonymous, generated, or held only in memory.
Human-readable source coordinates
Human-readable source coordinates describe locations intended for diagnostics, display, import/export, and tooling surfaces.
SourceCodeLocationrepresents a required file path plus 1-based line and column.SourceCodeRangeextendsSourceCodeLocationwith a display/diagnostic length.
These contracts are useful when a readable source location is known but no canonical runtime absolute position is available.
For human-readable coordinates:
- no absolute source offset is stored;
FilePathis required;LineandColumnare 1-based;Length, when present, is intended for display or diagnostic ranges rather than runtime slicing authority.
Why both models exist
An absolute position in a source string and a file/line/column location are not interchangeable without the source text and the counting conventions used to interpret it.
Line endings, tab expansion, Unicode representation, and column-counting rules can all make conversion context-dependent. A runtime offset can be the correct contract for token and parse-node operations while still being insufficient to reconstruct a human-readable location without additional source context. Conversely, a human-readable file/line/column location can be enough for diagnostics or tooling while not identifying a canonical absolute offset in a particular runtime source buffer.
For that reason, SourceSpan does not replace SourceCodeRange, and SourceCodeLocation does not replace SourceLocation. They model different contracts and should only be converted by code that explicitly owns the relevant source text and counting conventions.
Intended consumers
This package is designed to be shared by diagnostics, parser runtime components, source generators, and future tooling surfaces that need source-location data without depending on omy.Utils.Parser.Diagnostics.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on omy.Utils.Parser.Source:
| Package | Downloads |
|---|---|
|
omy.Utils.Parser.Diagnostics
Shared diagnostics model and descriptor catalog for Utils.Parser runtime and source generator. |
|
|
omy.Utils.Parser
Universal Parser - A self-describing parser framework. Reads ANTLR4 grammar files and builds parse trees for any source file. The ANTLR4 grammar reader is itself built using the same metamodel objects. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-rc.1 | 82 | 8/28/2026 |