Table of Contents

Class DiagnoseDocumentPayload

Namespace
RDCore.SDK.Platform.Protocol
Assembly
RDCore.SDK.dll

The System.Text.Json payload carried in Json.

public record DiagnoseDocumentPayload : IEquatable<DiagnoseDocumentPayload>
Inheritance
DiagnoseDocumentPayload
Implements
Inherited Members

Remarks

Deliberately a record the language server grows: a SemanticContext field (resolver output — bound types, semantic flags) joins it once the resolver exists, so semantic and runtime analyzers receive the same envelope. SourceVersion is the workspace document version the parse was taken at; a provider echoes it back so the language server can drop a report that raced a later edit.

Constructors

DiagnoseDocumentPayload(Uri, int, ModuleParseResult, ModuleSemanticsDto?, AnalysisPhase)

The System.Text.Json payload carried in Json.

public DiagnoseDocumentPayload(Uri DocumentUri, int SourceVersion, ModuleParseResult ParseResult, ModuleSemanticsDto? Semantics = null, AnalysisPhase Phase = AnalysisPhase.All)

Parameters

DocumentUri Uri

The document being diagnosed.

SourceVersion int

The workspace document version ParseResult was produced from.

ParseResult ModuleParseResult

The parsed module — AST plus syntax errors.

Semantics ModuleSemanticsDto

What the environment host's semantic analysis pass found out about the module (RD-VBAL §5.0.3): the facts an analyzer decides what to say of. null when the host has none, because it is not part of the platform or the module's code has not been loaded.

Phase AnalysisPhase

Which phase of the analysis the provider is asked for (AnalysisPhase): what it answers is the findings of that phase only, and the language server puts the phases together. Every phase, when not said.

Remarks

Deliberately a record the language server grows: a SemanticContext field (resolver output — bound types, semantic flags) joins it once the resolver exists, so semantic and runtime analyzers receive the same envelope. SourceVersion is the workspace document version the parse was taken at; a provider echoes it back so the language server can drop a report that raced a later edit.

Properties

DocumentUri

The document being diagnosed.

public Uri DocumentUri { get; init; }

Property Value

Uri

ParseResult

The parsed module — AST plus syntax errors.

public ModuleParseResult ParseResult { get; init; }

Property Value

ModuleParseResult

Phase

Which phase of the analysis the provider is asked for (AnalysisPhase): what it answers is the findings of that phase only, and the language server puts the phases together. Every phase, when not said.

public AnalysisPhase Phase { get; init; }

Property Value

AnalysisPhase

Semantics

What the environment host's semantic analysis pass found out about the module (RD-VBAL §5.0.3): the facts an analyzer decides what to say of. null when the host has none, because it is not part of the platform or the module's code has not been loaded.

public ModuleSemanticsDto? Semantics { get; init; }

Property Value

ModuleSemanticsDto

SourceVersion

The workspace document version ParseResult was produced from.

public int SourceVersion { get; init; }

Property Value

int