Class EmbeddedCodePreparationContext
- Namespace
- Utils.Parser.EmbeddedCode
- Assembly
- Utils.Parser.dll
Describes the explicit preparation environment for ANTLR embedded-code source.
public sealed record EmbeddedCodePreparationContext : IEquatable<EmbeddedCodePreparationContext>
- Inheritance
-
EmbeddedCodePreparationContext
- Implements
- Inherited Members
- Extension Methods
Constructors
EmbeddedCodePreparationContext(string, EmbeddedCodeTarget, string?, string?, int, IReadOnlySet<EmbeddedCodeContextSymbol>?)
Initializes a new instance of the EmbeddedCodePreparationContext record.
public EmbeddedCodePreparationContext(string grammarName, EmbeddedCodeTarget target, string? ruleName = null, string? languageOrCompilerIdentity = null, int symbolModelVersion = 1, IReadOnlySet<EmbeddedCodeContextSymbol>? supportedSymbols = null)
Parameters
grammarNamestringName of the grammar that owns the embedded source.
targetEmbeddedCodeTargetPreparation path that will consume the embedded source.
ruleNamestringOptional rule name associated with the embedded source.
languageOrCompilerIdentitystringOptional explicit language or compiler identity configured by the caller.
symbolModelVersionintVersion of the contextual symbol model understood by the preparer.
supportedSymbolsIReadOnlySet<EmbeddedCodeContextSymbol>Contextual symbols that are available to the preparer.
Properties
GrammarName
Gets the name of the grammar that owns the embedded source.
public string GrammarName { get; }
Property Value
LanguageOrCompilerIdentity
Gets the optional explicit language or compiler identity configured by the caller.
public string? LanguageOrCompilerIdentity { get; }
Property Value
RuleName
Gets the optional rule name associated with the embedded source.
public string? RuleName { get; }
Property Value
SupportedSymbols
Gets the contextual symbols that are available to the preparer.
public IReadOnlySet<EmbeddedCodeContextSymbol> SupportedSymbols { get; }
Property Value
SymbolModelVersion
Gets the version of the contextual symbol model understood by the preparer.
public int SymbolModelVersion { get; }
Property Value
Target
Gets the preparation path that will consume the embedded source.
public EmbeddedCodeTarget Target { get; }