Table of Contents

Class EmbeddedCodeRuntimeKey

Namespace
Utils.Parser.EmbeddedCode
Assembly
Utils.Parser.dll

Describes the runtime dispatch identity shared by parser embedded-code execution paths.

public sealed record EmbeddedCodeRuntimeKey : IEquatable<EmbeddedCodeRuntimeKey>
Inheritance
EmbeddedCodeRuntimeKey
Implements
Inherited Members
Extension Methods

Constructors

EmbeddedCodeRuntimeKey(EmbeddedCodeKind, string, string, int?, int?)

Initializes a new instance of the EmbeddedCodeRuntimeKey record.

public EmbeddedCodeRuntimeKey(EmbeddedCodeKind kind, string ruleName, string sourceText, int? alternativeIndex, int? elementIndex)

Parameters

kind EmbeddedCodeKind

Embedded-code kind used by runtime dispatch.

ruleName string

Owning parser rule name.

sourceText string

Raw embedded-code source text.

alternativeIndex int?

Optional runtime alternative index.

elementIndex int?

Optional runtime element index.

Properties

AlternativeIndex

Gets the optional runtime alternative index.

public int? AlternativeIndex { get; }

Property Value

int?

ElementIndex

Gets the optional runtime element index.

public int? ElementIndex { get; }

Property Value

int?

Kind

Gets the embedded-code kind used by runtime dispatch.

public EmbeddedCodeKind Kind { get; }

Property Value

EmbeddedCodeKind

RuleName

Gets the owning parser rule name.

public string RuleName { get; }

Property Value

string

SourceText

Gets the raw embedded-code source text.

public string SourceText { get; }

Property Value

string

Methods

FromSource(EmbeddedCodeSource)

Creates a runtime key from source metadata when it has an owning parser rule.

public static EmbeddedCodeRuntimeKey FromSource(EmbeddedCodeSource source)

Parameters

source EmbeddedCodeSource

Embedded-code source metadata.

Returns

EmbeddedCodeRuntimeKey

A runtime key for executable parser embedded code.