Skip to content

IParser Interface

Describes a parser

C#
public interface IParser

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

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

Generates a colored string from a string of characters.

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

value ReadOnlySpan<char>
The characters to process.

surfaceIndex int
The index on the backing surface, if it applies.

surface ICellSurface
The backing surface the parser is interacting with, if it applies.

initialBehaviors ParseCommandStacks
A set of known behaviors to apply to the parser.

ColoredString