Class RuleRef
A reference to another rule, either lexer or parser depending on context.
Optionally carries a label (x=child or xs+=child) and raw call-site argument text
preserved from callee[...] syntax.
Labels and raw arguments are metadata only: they are not evaluated, not bound automatically,
and do not populate invocation-frame parameters.
public record RuleRef : RuleContent, IEquatable<RuleContent>, IEquatable<RuleRef>
- Inheritance
-
RuleRef
- Implements
- Inherited Members
- Extension Methods
Constructors
RuleRef(string, RuleLabel?, string?)
A reference to another rule, either lexer or parser depending on context.
Optionally carries a label (x=child or xs+=child) and raw call-site argument text
preserved from callee[...] syntax.
Labels and raw arguments are metadata only: they are not evaluated, not bound automatically,
and do not populate invocation-frame parameters.
public RuleRef(string RuleName, RuleLabel? Label = null, string? RawArguments = null)
Parameters
Properties
Label
public RuleLabel? Label { get; init; }
Property Value
LabelKind
Gets the label kind derived from the optional Label. Returns None when the reference is unlabeled. Metadata only: no ANTLR-compatible label access is implemented.
public ParserRuleReferenceLabelKind LabelKind { get; }
Property Value
LabelName
Gets the label name from the optional Label, or null when unlabeled.
Metadata only: no implicit variable, typed field, or automatic binding is generated.
public string? LabelName { get; }
Property Value
RawArguments
public string? RawArguments { get; init; }
Property Value
RuleName
public string RuleName { get; init; }