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
kindEmbeddedCodeKindEmbedded-code kind used by runtime dispatch.
ruleNamestringOwning parser rule name.
sourceTextstringRaw embedded-code source text.
alternativeIndexint?Optional runtime alternative index.
elementIndexint?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
RuleName
Gets the owning parser rule name.
public string RuleName { get; }
Property Value
SourceText
Gets the raw embedded-code source text.
public string SourceText { get; }
Property Value
Methods
FromSource(EmbeddedCodeSource)
Creates a runtime key from source metadata when it has an owning parser rule.
public static EmbeddedCodeRuntimeKey FromSource(EmbeddedCodeSource source)
Parameters
sourceEmbeddedCodeSourceEmbedded-code source metadata.
Returns
- EmbeddedCodeRuntimeKey
A runtime key for executable parser embedded code.