prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
43 lines (42 loc) • 1.05 kB
JavaScript
import { l as languages } from "../../index-DF54SWhA.js";
var guid = {
// https://en.wikipedia.org/wiki/Universally_unique_identifier#Format
pattern: /\{[a-f\d]{8}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{4}-[a-f\d]{12}\}/i,
alias: "constant",
inside: {
"punctuation": /[{}]/
}
};
languages["solution-file"] = {
"comment": /#.*/g,
"string": {
pattern: /"[^\n"]*"|'[^\n']*'/g,
inside: {
"guid": guid
}
},
"object": {
// Foo
// Bar("abs") = 9
// EndBar
// Prop = TRUE
// EndFoo
pattern: /^([ ]*)(?:([A-Z]\w*)\b(?=.*\n(?:\1[ ].*\n)*\1End\2(?=[ ]*$))|End[A-Z]\w*(?=[ ]*$))/mg,
lookbehind: true,
alias: "keyword"
},
"property": {
pattern: /^([ ]*)(?!\s)[^\n"#=()]*[^\s"#=()](?=\s*=)/m,
lookbehind: true,
inside: {
"guid": guid
}
},
"guid": guid,
"number": /\b\d+(?:\.\d+)*\b/,
"boolean": /\b(?:FALSE|TRUE)\b/,
"operator": /=/,
"punctuation": /[(),]/
};
languages["sln"] = languages["solution-file"];
//# sourceMappingURL=solution-file.js.map