Table of Contents

Struct SyntaxToken

Namespace
SharpConsoleUI.Controls
Assembly
SharpConsoleUI.dll

Represents a colored token span within a source line for syntax highlighting.

public readonly record struct SyntaxToken : IEquatable<SyntaxToken>
Implements
Inherited Members
Extension Methods

Constructors

SyntaxToken(int, int, Color)

Represents a colored token span within a source line for syntax highlighting.

public SyntaxToken(int StartIndex, int Length, Color ForegroundColor)

Parameters

StartIndex int

The zero-based character index where this token begins in the source line.

Length int

The number of characters this token spans.

ForegroundColor Color

The foreground color to use when rendering this token.

Properties

ForegroundColor

The foreground color to use when rendering this token.

public Color ForegroundColor { get; init; }

Property Value

Color

Length

The number of characters this token spans.

public int Length { get; init; }

Property Value

int

StartIndex

The zero-based character index where this token begins in the source line.

public int StartIndex { get; init; }

Property Value

int