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
StartIndexintThe zero-based character index where this token begins in the source line.
LengthintThe number of characters this token spans.
ForegroundColorColorThe 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
Length
The number of characters this token spans.
public int Length { get; init; }
Property Value
StartIndex
The zero-based character index where this token begins in the source line.
public int StartIndex { get; init; }