Vixen
02b45cc4
csharp
public sealed class Location

A location in source: a file path plus a TextSpan. When backed by a SourceText it can resolve the span to a LinePositionSpan (line/column) for display.

No guide page documents this yet — the page shows what the code says about itself.

Fields and properties (5)

  • public static readonly Location None

    A location with no source position (e.g. compiler-synthesized).

  • public string FilePath

    Path of the file this location is in, or empty when unknown.

  • public TextSpan SourceSpan

    Character range within the file.

  • public SourceText? SourceText

    The text this location points into, or null when it is unbacked. Rendering a diagnostic with the offending line needs it.

  • public bool IsNone

    True when this is None (no meaningful source span).

Methods (3)

  • public static Location Create(string filePath, TextSpan span, SourceText text)

    A location backed by source text, so it can render line and column.

  • public LinePositionSpan GetLineSpan()

    The span mapped to zero-based line/character, or a zero span when unbacked.

  • public override string ToString()

    Renders as path(line,column), or <none> when unpositioned.

Used by (29)

  • BinderVixen.Ui.Markup
  • DiagnosticVixen.Core.Syntax
  • DiagnosticBagVixen.Core.Syntax
  • DiagnosticFormatterVixen.Core.Syntax
  • DiagnosticsTestsVixen.Core.Syntax.Tests
  • RecoveryTestsVixen.Ui.Markup.Tests
  • RedTreeTestsVixen.Core.Syntax.Tests
  • SyntaxNodeVixen.Core.Syntax
  • SyntaxTreeVixen.Ui.Markup
  • VxmlGeneratorVixen.Ui.Markup.Generators
  • VxmlLexerVixen.Ui.Markup
  • VxmlParserVixen.Ui.Markup
  • BuilderVixen.Raven
  • CompilationVixen.Raven
  • DiagnosticFormatterTestsVixen.Raven.Tests
  • DiagnosticsTestsVixen.Raven.Tests
  • GlslEmitterVixen.Raven
  • IrVerifierVixen.Raven
  • LibraryBuilderVixen.Raven
  • LowererVixen.Raven
  • MetadataLoaderVixen.Raven
  • RavenLexerVixen.Raven
  • RavenParserVixen.Raven
  • RavenSyntaxErrorListenerVixen.Raven.Tests
  • SemanticModelTestsVixen.Raven.Tests
  • ShaderDocumentVixen.Editor.AssetEditors
  • SourceNamedTypeSymbolVixen.Raven
  • SpirvBackendVixen.Raven
  • SpirvEmitterVixen.Raven