codemirror-lang-knight
Version:
CodeMirror Syntax Highlighting for the Knight programming language (https://github.com/knight-lang/knight-lang/)
24 lines (17 loc) • 573 B
text/typescript
import { styleTags, tags as t } from "@lezer/highlight";
export const knightHighlighting = styleTags({
Comment: t.comment,
Number: t.number,
String: t.string,
List: t.constant(t.name),
Boolean: t.atom,
Null: t.null,
Identifier: t.variableName,
Variable: t.definition(t.variableName),
Function: t.function(t.variableName),
"_": t.standard(t.name),
"Noop Expr": t.meta,
"( ) { }": t.comment,
"Unary_Operator Binary_Operator =": t.operator,
"Call_Op Nullary Unary_Op Binary_Op Ternary_Op Quaternary_Op": t.keyword,
});