prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
41 lines (40 loc) • 1.67 kB
JavaScript
import { l as e, i as t } from "../prismCore-5c7f03d0.js";
import "./clike.js";
e.jolie = e.extend("clike", {
string: {
pattern: /(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,
lookbehind: !0,
greedy: !0
},
"class-name": {
pattern: /((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,
lookbehind: !0
},
keyword: /\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,
function: /\b[a-z_]\w*(?=[ \t]*[@(])/i,
number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,
operator: /-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,
punctuation: /[()[\]{},;.:]/,
builtin: /\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/
});
t("jolie", "keyword", {
aggregates: {
pattern: /(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,
lookbehind: !0,
inside: {
keyword: /\bwith\b/,
"class-name": /\w+/,
punctuation: /,/
}
},
redirects: {
pattern: /(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,
lookbehind: !0,
inside: {
punctuation: /,/,
"class-name": /\w+/,
operator: /=>/
}
},
property: /\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/
});