on-codemerge
Version:
A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product
45 lines (44 loc) • 773 B
JavaScript
import { TokenType as e } from "../../../types.mjs";
const r = {
name: "clojure",
patterns: {
[e.Comment]: /^;.*/,
[e.String]: /^"(?:[^"\\]|\\.)*"/,
[e.Number]: /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?M?/,
[e.Function]: /^\((?:def|defn|fn)[\s\S]*?\)/,
[e.Symbol]: /^'[^()\s]+/,
[e.Keyword]: /^:[^()\s]+/,
[e.Operator]: /^[+\-*/%<>!=]/,
[e.Punctuation]: /^[()[\]{}]/
},
keywords: [
"def",
"defn",
"defmacro",
"defprotocol",
"defrecord",
"deftype",
"fn",
"if",
"do",
"let",
"loop",
"recur",
"when",
"cond",
"for",
"doseq",
"case",
"try",
"catch",
"finally",
"throw",
"quote",
"var",
"new",
"set!"
]
};
export {
r as clojureDefinition
};