Table of Contents

Class G4SyntaxColorisation

Namespace
Utils.Parser.Runtime
Assembly
Utils.Parser.dll

Provides a built-in syntax colorization profile for ANTLR4 grammar files (.g4).

public sealed class G4SyntaxColorisation : ISyntaxColorisation
Inheritance
G4SyntaxColorisation
Implements
Inherited Members
Extension Methods

Constructors

G4SyntaxColorisation()

Initializes a new instance of the G4SyntaxColorisation class.

public G4SyntaxColorisation()

Properties

FileExtensions

Gets the file extensions supported by this colorization profile.

public IReadOnlyList<string> FileExtensions { get; }

Property Value

IReadOnlyList<string>

Instance

Gets the singleton instance of the built-in G4 syntax colorization profile.

public static G4SyntaxColorisation Instance { get; }

Property Value

G4SyntaxColorisation

StringSyntaxExtensions

Gets the StringSyntaxAttribute names supported by this profile.

public IReadOnlyList<string> StringSyntaxExtensions { get; }

Property Value

IReadOnlyList<string>

Methods

GetClassification(IEnumerable<string>)

Gets the Visual Studio classification name for a grammar rule path. The path must be ordered from parent rule to most specific rule.

public string? GetClassification(IEnumerable<string> rulePath)

Parameters

rulePath IEnumerable<string>

Ordered rule path from root to leaf.

Returns

string

The classification name to use, or null when no mapping exists.

GetClassification(string)

Gets the Visual Studio classification name for a single grammar rule.

public string? GetClassification(string ruleName)

Parameters

ruleName string

Grammar rule name.

Returns

string

The classification name to use, or null when no mapping exists.