namespace Blog.Models; /// /// What a run of characters is, as far as a grayscale highlighter cares. /// /// /// Deliberately short. With no colour to spend, a line of code can carry about three distinctions /// before they stop being distinctions: what the language says (), what the /// program says ( and ), and what the author says /// (). Everything else is . /// public enum SyntaxKind { /// Identifiers, operators, whitespace — anything with no treatment of its own. Text, Comment, /// A string, character or template literal, quotes included. String, Number, /// A word the language reserves, and in markup the tag brackets around a name. Keyword, /// /// The line that isn't code: a preprocessor directive, a shell variable, a doctype, a /// markdown heading, a JSON key. /// Meta } /// One run of characters from a line, and what it is. public sealed record SyntaxToken(SyntaxKind Kind, string Text);