Skip to content

Default Class

The default string parser.

C#
public class Default : IParser

Inheritance object

Implements IParser

C#
public Default()

Custom processor called before the build in command resolver.

C#
public Func<string, string, ColoredGlyphAndEffect[], ICellSurface?, ParseCommandStacks?, ParseCommandBase?>? CustomProcessor

Signature is (“command”, “parameters”, existing glyphs, text surface, associated editor, command stacks).

A dictionary of variable resolution methods.

C#
public Dictionary<string, Func<string>> Variables { get; }

Parse(ReadOnlySpan<char>, int, ICellSurface?, ParseCommandStacks?)

Section titled “Parse(ReadOnlySpan<char>, int, ICellSurface?, ParseCommandStacks?)”

Creates a colored string by parsing commands embedded in the string.

C#
public ColoredString Parse(ReadOnlySpan<char> value, int surfaceIndex = -1, ICellSurface? surface = null, ParseCommandStacks? initialBehaviors = null)

value ReadOnlySpan<char>
The string to parse.

surfaceIndex int
Index of where this string will be printed.

surface ICellSurface
The surface the string will be printed to.

initialBehaviors ParseCommandStacks
Any initial defaults.

ColoredString
The finalized string.