codemirror-lang-knight
Version:
CodeMirror Syntax Highlighting for the Knight programming language (https://github.com/knight-lang/knight-lang/)
19 lines (16 loc) • 409 B
text/typescript
import { parser } from "./parser";
import { LRLanguage } from "@codemirror/language";
export const knightLanguage = LRLanguage.define({
name: "knight",
parser: parser.configure({
props: [],
}),
languageData: {
commentTokens: { line: "#" },
closeBrackets: { brackets: ["(", '"', "'"] },
wordChars: "$",
},
});
export function knight() {
return knightLanguage;
}