Class ParserRuleCallExecutionContext
Carries passive metadata for an explicit parser rule-call execution policy invocation. Raw arguments are split syntactically only. The parser does not evaluate or bind them automatically; an explicitly installed policy may request an atomic managed seed batch through TrySetParameterSeeds(IReadOnlyDictionary<string, object?>).
public sealed class ParserRuleCallExecutionContext
- Inheritance
-
ParserRuleCallExecutionContext
- Inherited Members
- Extension Methods
Properties
CallerFrame
Gets the caller invocation frame that was current when the rule call began, when frame tracking is enabled. Policies must not treat the mutable frame as rollback-managed external state or retain it beyond the callback.
public required ParserRuleInvocationFrame? CallerFrame { get; init; }
Property Value
CompletedCallResult
Gets the annotated completed child-call result after a successful call when invocation-frame tracking is enabled.
public ParserRuleCallResult? CompletedCallResult { get; }
Property Value
LabelKind
Gets the label kind from the current call site.
public ParserRuleReferenceLabelKind LabelKind { get; init; }
Property Value
LabelName
Gets the optional label name from the current call site.
public string? LabelName { get; init; }
Property Value
NamedRawArguments
Gets syntactically split named raw arguments when every top-level argument has a supported name separator;
otherwise, gets null. Values remain uninterpreted source text.
public IReadOnlyDictionary<string, string>? NamedRawArguments { get; init; }
Property Value
PositionalRawArguments
Gets syntactically split positional raw arguments when an argument clause is present. Values remain uninterpreted source text.
public IReadOnlyList<string>? PositionalRawArguments { get; init; }
Property Value
RawArguments
Gets the uninterpreted raw argument text from the current call site, without outer brackets.
public string? RawArguments { get; init; }
Property Value
RuleName
Gets the target parser rule name.
public required string RuleName { get; init; }
Property Value
Succeeded
Gets whether the target parser rule produced a parse node.
public bool Succeeded { get; }
Property Value
TargetRuleDescriptor
Gets passive metadata for the target parser rule.
public ParserRuleInvocationDescriptor? TargetRuleDescriptor { get; init; }
Property Value
Methods
TrySetParameterSeed(string, object?)
Attempts to seed one parameter for the current target rule through managed pending-child state. The caller cannot select a different target rule through this API.
public bool TrySetParameterSeed(string parameterName, object? value)
Parameters
parameterNamestringDeclared target parameter name.
valueobjectUntyped value to seed, including
null.
Returns
- bool
truewhen managed seeding is available; otherwise,false.
TrySetParameterSeeds(IReadOnlyDictionary<string, object?>)
Attempts to atomically seed multiple parameters for the current target rule through managed pending-child state. The caller cannot select a different target rule through this API, and implementations must retain all values or none.
public bool TrySetParameterSeeds(IReadOnlyDictionary<string, object?> values)
Parameters
valuesIReadOnlyDictionary<string, object>Declared target parameter names and their untyped values, including
null.
Returns
- bool
truewhen every seed was retained atomically; otherwise,false.