Table of Contents

Class ParseDocumentParams

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

The parameter object for a ParseDocumentCommand. The [Method] attribute lets the JSON-RPC layer infer the request method when the caller sends this by type.

[Method("rdcore/parser/document", Direction.ClientToServer)]
public record ParseDocumentParams : IRequest, IRequest<Unit>, IRequest<PlatformJsonEnvelope>, IBaseRequest, IEquatable<ParseDocumentParams>
Inheritance
ParseDocumentParams
Implements
IRequest
IRequest<Unit>
IBaseRequest
Inherited Members

Remarks

The response is a PlatformJsonEnvelope wrapping a ModuleParseResult — the AST is polymorphic and the JSON-RPC transport's serializer cannot round-trip it (see PlatformJson).

Properties

AnchorOffset

The position of the fragment in the source document.

public SourcePosition AnchorOffset { get; init; }

Property Value

SourcePosition

Remarks

  • This property is ignored if a DocumentUri is specified.
  • Anchor offset is L0C0 unless specified otherwise.

DocumentUri

The Uri of the document to parse.

public Uri? DocumentUri { get; init; }

Property Value

Uri

Fragment

The fragment of source code to parse.

public string? Fragment { get; init; }

Property Value

string

Remarks

An AnchorOffset should also be specified.