import { styleTags, tags as t } from "@lezer/highlight"; export const highlighting = styleTags({ // Comments Comment: t.lineComment, // Literals NumberLiteral: t.number, StringLiteral: t.string, BooleanLiteral: t.bool, // Identifiers Identifier: t.variableName, "FunctionDecl/Identifier": t.function(t.definition(t.variableName)), "FunctionCall/Identifier": t.function(t.variableName), "ArgumentList/Identifier": t.variableName, // Keywords - Definitions (use controlKeyword for better color) discoverHowTo: t.controlKeyword, expertsClaim: t.keyword, toBe: t.operator, with: t.keyword, of: t.keyword, // Keywords - Control flow whatIf: t.controlKeyword, liesBang: t.controlKeyword, shockingDevelopment: t.controlKeyword, // Keywords - I/O youWontWantToMiss: t.keyword, latestNewsOn: t.keyword, // Keywords - Block delimiters rumorHasIt: t.brace, endOfStory: t.brace, // Keywords - Program structure pleaseLikeAndSubscribe: t.moduleKeyword, // Operators - Comparison isActually: t.compareOperator, beats: t.compareOperator, smallerThan: t.compareOperator, // Operators - Logical and: t.logicOperator, or: t.logicOperator, // Operators - Arithmetic plus: t.arithmeticOperator, minus: t.arithmeticOperator, times: t.arithmeticOperator, dividedBy: t.arithmeticOperator, modulo: t.arithmeticOperator, // Punctuation "(": t.paren, ")": t.paren, ",": t.separator, });