Table of Contents

Class ParserEmbeddedCodeTransformationContext

Namespace
Utils.Parser.Diagnostics.EmbeddedCode
Assembly
Utils.Parser.Diagnostics.dll

Context supplied to embedded-code transformers.

public sealed class ParserEmbeddedCodeTransformationContext
Inheritance
ParserEmbeddedCodeTransformationContext
Inherited Members
Extension Methods

Properties

Code

Gets the raw embedded code exactly as represented by the grammar parser.

public string Code { get; set; }

Property Value

string

EmptyLabels

Gets an empty label map shared by default contexts.

public static IReadOnlyDictionary<string, ParserEmbeddedRuleLabelDescriptor> EmptyLabels { get; }

Property Value

IReadOnlyDictionary<string, ParserEmbeddedRuleLabelDescriptor>

GrammarName

Gets the owning grammar name when available.

public string? GrammarName { get; set; }

Property Value

string

Labels

Gets parser rule-reference labels visible to the code block.

public IReadOnlyDictionary<string, ParserEmbeddedRuleLabelDescriptor> Labels { get; set; }

Property Value

IReadOnlyDictionary<string, ParserEmbeddedRuleLabelDescriptor>

Locals

Gets passive local metadata visible to the code block.

public IReadOnlyList<ParserEmbeddedRuleDeclarationDescriptor> Locals { get; set; }

Property Value

IReadOnlyList<ParserEmbeddedRuleDeclarationDescriptor>

Location

Gets the grammar location that owns the embedded code.

public ParserEmbeddedCodeLocation Location { get; set; }

Property Value

ParserEmbeddedCodeLocation

Parameters

Gets passive parameter metadata visible to the code block.

public IReadOnlyList<ParserEmbeddedRuleDeclarationDescriptor> Parameters { get; set; }

Property Value

IReadOnlyList<ParserEmbeddedRuleDeclarationDescriptor>

Returns

Gets passive return metadata visible to the code block.

public IReadOnlyList<ParserEmbeddedRuleDeclarationDescriptor> Returns { get; set; }

Property Value

IReadOnlyList<ParserEmbeddedRuleDeclarationDescriptor>

RuleName

Gets the owning parser rule name when available.

public string? RuleName { get; set; }

Property Value

string