Class SemanticDocumentResult
Represents resolved semantic occurrences and diagnostics for a MuLang document.
public sealed class SemanticDocumentResult
- Inheritance
-
SemanticDocumentResult
- Inherited Members
Properties
Diagnostics
Gets the diagnostics produced while analyzing the document.
public DiagnosticCollection Diagnostics { get; }
Property Value
LineMap
Gets the source line map.
public TextLineMap LineMap { get; }
Property Value
Occurrences
Gets the resolved semantic occurrences.
public IReadOnlyList<SemanticOccurrence> Occurrences { get; }
Property Value
SourceDocument
Gets the source document URI, when available.
public Uri? SourceDocument { get; }
Property Value
- Uri
Methods
GetHighlights(int)
Gets the semantic or control-flow highlights containing an offset.
public IReadOnlyList<SemanticOccurrence> GetHighlights(int offset)
Parameters
offsetintThe zero-based Unicode scalar offset.
Returns
- IReadOnlyList<SemanticOccurrence>
The related occurrences in source order.
Exceptions
- ArgumentOutOfRangeException
Thrown when
offsetis outside the source bounds.
GetOccurrence(int)
Gets the smallest semantic occurrence containing an offset.
public SemanticOccurrence? GetOccurrence(int offset)
Parameters
offsetintThe zero-based Unicode scalar offset.
Returns
- SemanticOccurrence
The containing occurrence, or
nullwhen no occurrence contains the offset.
Exceptions
- ArgumentOutOfRangeException
Thrown when
offsetis outside the source bounds.
GetOccurrences(SemanticSymbolKey)
Gets all occurrences of a resolved symbol.
public IReadOnlyList<SemanticOccurrence> GetOccurrences(SemanticSymbolKey symbol)
Parameters
symbolSemanticSymbolKeyThe semantic symbol identity.
Returns
- IReadOnlyList<SemanticOccurrence>
The matching occurrences in source order.
Exceptions
- ArgumentNullException
Thrown when
symbolisnull.