Code/SboxSuperuser/UI/HighlightSpan.cs

A small record struct used by a code viewer's syntax highlighting. It stores one colored piece of a line: line index, column, length, foreground color, and an optional swatch color for drawing a sample under color literals.

using Sandbox;

namespace SboxSuperuser.UI;

/// <summary>One colored piece of a line. Swatch marks colors, which get a small sample drawn under them.</summary>
internal readonly record struct HighlightSpan( int Line, int Column, int Length, Vector4 Color, Vector4? Swatch );