prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
38 lines (37 loc) • 1.23 kB
JavaScript
import { l as languages } from "../../index-DF54SWhA.js";
import { e as clikePunctuation, f as clikeNumber, b as boolean, c as clikeString } from "../../patterns-Jkz_nwNQ.js";
languages["firestore-security-rules"] = {
"comment": /\/\/.*/,
"string": clikeString,
"path": {
pattern: /(^|[\s(),])(?:\/(?:[\w\xa0-\uffff]+|\{[\w\xa0-\uffff]+(?:=\*\*)?\}|\$\([\w\xa0-\uffff.]+\)))+/g,
lookbehind: true,
inside: {
"variable": {
pattern: /\{[\w\xa0-\uffff]+(?:=\*\*)?\}|\$\([\w\xa0-\uffff.]+\)/,
inside: {
"operator": /=/,
"keyword": /\*\*/,
"punctuation": /[(){}.$]/
}
},
"punctuation": /\//
}
},
"method": {
// to make the pattern shorter, the actual method names are omitted
pattern: /(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,
lookbehind: true,
alias: "builtin",
inside: {
"punctuation": /,/
}
},
"keyword": /\b(?:allow|function|if|match|null|return|rules_version|service)\b/,
"boolean": boolean,
"function": /\b\w+(?=\()/,
"number": clikeNumber,
"operator": /&&|\|\||[!=<>]=?|[%/*+-]|\bi[ns]\b/,
"punctuation": clikePunctuation
};
//# sourceMappingURL=firestore-security-rules.js.map