Table of Contents

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

grammarName string

Name of the grammar that owns the embedded source.

target EmbeddedCodeTarget

Preparation path that will consume the embedded source.

ruleName string

Optional rule name associated with the embedded source.

languageOrCompilerIdentity string

Optional explicit language or compiler identity configured by the caller.

symbolModelVersion int

Version of the contextual symbol model understood by the preparer.

supportedSymbols IReadOnlySet<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

string

LanguageOrCompilerIdentity

Gets the optional explicit language or compiler identity configured by the caller.

public string? LanguageOrCompilerIdentity { get; }

Property Value

string

RuleName

Gets the optional rule name associated with the embedded source.

public string? RuleName { get; }

Property Value

string

SupportedSymbols

Gets the contextual symbols that are available to the preparer.

public IReadOnlySet<EmbeddedCodeContextSymbol> SupportedSymbols { get; }

Property Value

IReadOnlySet<EmbeddedCodeContextSymbol>

SymbolModelVersion

Gets the version of the contextual symbol model understood by the preparer.

public int SymbolModelVersion { get; }

Property Value

int

Target

Gets the preparation path that will consume the embedded source.

public EmbeddedCodeTarget Target { get; }

Property Value

EmbeddedCodeTarget