prism-react-editor
Version:
Lightweight, extensible code editor component for React apps
29 lines (28 loc) • 891 B
JavaScript
import { l as languages } from "../../index-k28m3HFc.js";
import { c as clikePunctuation, d as boolean } from "../../patterns-Cp3h1ylA-DIMdJT1M.js";
languages.rego = {
"comment": /#.*/,
"property": {
pattern: /(^|[^\\.])(?:"(?:\\.|[^\\\n"])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/gi,
lookbehind: true,
greedy: true
},
"string": {
pattern: /(^|[^\\])"(?:\\.|[^\\\n"])*"|`[^`]*`/g,
lookbehind: true,
greedy: true
},
"keyword": /\b(?:as|default|else|import|not|null|package|set(?=\s*\()|some|with)\b/,
"boolean": boolean,
"function": {
pattern: /\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i,
inside: {
"namespace": /\b\w+(?=\s*\.)/,
"punctuation": /\./
}
},
"number": /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
"operator": /[%&|/*+-]|[:=<>]=?|!=|\b_\b/,
"punctuation": clikePunctuation
};
//# sourceMappingURL=rego.js.map