Table of Contents

Class ParserRuleInvocationDescriptor

Namespace
Utils.Parser.Runtime
Assembly
Utils.Parser.dll

Describes passive metadata associated with a parser rule invocation. The descriptor preserves grammar metadata for observation only and does not bind, allocate, propagate, or execute rule-level metadata.

public sealed class ParserRuleInvocationDescriptor
Inheritance
ParserRuleInvocationDescriptor
Inherited Members
Extension Methods

Properties

Exceptions

Gets passive exception metadata descriptors declared by the parser rule.

public IReadOnlyList<ParserRuleExceptionDescriptor> Exceptions { get; init; }

Property Value

IReadOnlyList<ParserRuleExceptionDescriptor>

Locals

Gets passive local descriptors declared by the parser rule.

public IReadOnlyList<ParserRuleLocalDescriptor> Locals { get; init; }

Property Value

IReadOnlyList<ParserRuleLocalDescriptor>

Options

Gets passive rule option metadata keyed by option name.

public IReadOnlyDictionary<string, string> Options { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Parameters

Gets passive parameter descriptors declared by the parser rule.

public IReadOnlyList<ParserRuleParameterDescriptor> Parameters { get; init; }

Property Value

IReadOnlyList<ParserRuleParameterDescriptor>

RawLocals

Gets the raw locals metadata text when it is available in the parser model.

public string? RawLocals { get; init; }

Property Value

string

RawParameters

Gets the raw parameter metadata text when it is available in the parser model.

public string? RawParameters { get; init; }

Property Value

string

RawReturnType

Gets the raw return metadata text when it is available in the parser model.

public string? RawReturnType { get; init; }

Property Value

string

Returns

Gets passive return descriptors declared by the parser rule.

public IReadOnlyList<ParserRuleReturnDescriptor> Returns { get; init; }

Property Value

IReadOnlyList<ParserRuleReturnDescriptor>

RuleName

Gets the parser rule name associated with the invocation.

public required string RuleName { get; init; }

Property Value

string

Methods

FromRule(Rule)

Creates a passive invocation descriptor from the metadata currently exposed by a parser rule.

public static ParserRuleInvocationDescriptor FromRule(Rule rule)

Parameters

rule Rule

Parser rule whose available metadata should be described.

Returns

ParserRuleInvocationDescriptor

A passive descriptor containing only currently represented rule metadata.