Class EmbeddedCodeSource
- Namespace
- Utils.Parser.EmbeddedCode
- Assembly
- Utils.Parser.dll
Describes a raw ANTLR embedded-code source block without assigning execution behavior to it.
public sealed record EmbeddedCodeSource : IEquatable<EmbeddedCodeSource>
- Inheritance
-
EmbeddedCodeSource
- Implements
- Inherited Members
- Extension Methods
Constructors
EmbeddedCodeSource(string, EmbeddedCodeKind, string?, int?, int?, SourceCodeLocation?)
Initializes a new instance of the EmbeddedCodeSource record.
public EmbeddedCodeSource(string sourceText, EmbeddedCodeKind kind, string? ruleName = null, int? alternativeIndex = null, int? elementIndex = null, SourceCodeLocation? location = null)
Parameters
sourceTextstringRaw embedded-code source text without surrounding ANTLR delimiters.
kindEmbeddedCodeKindKind of ANTLR construct that owns the source text.
ruleNamestringOptional rule name that owns the source text.
alternativeIndexint?Optional zero-based alternative index that owns the source text.
elementIndexint?Optional zero-based element index that owns the source text.
locationSourceCodeLocationOptional human-readable source location for diagnostics or tooling.
Properties
AlternativeIndex
Gets the optional zero-based alternative index that owns the source text.
public int? AlternativeIndex { get; }
Property Value
- int?
ElementIndex
Gets the optional zero-based element index that owns the source text.
public int? ElementIndex { get; }
Property Value
- int?
Kind
Gets the kind of ANTLR construct that owns the source text.
public EmbeddedCodeKind Kind { get; }
Property Value
Location
Gets the optional human-readable source location for diagnostics or tooling.
public SourceCodeLocation? Location { get; }
Property Value
RawCode
Gets the typed raw embedded-code source text without surrounding ANTLR delimiters.
public RawEmbeddedCode RawCode { get; }
Property Value
RuleName
Gets the optional rule name that owns the source text.
public string? RuleName { get; }
Property Value
SourceText
Gets the raw embedded-code source text without surrounding ANTLR delimiters.
public string SourceText { get; }