prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
45 lines (44 loc) • 1.32 kB
JavaScript
import { a as languages } from "../../core-8vQkh0Rd.js";
import { n as clikeComment } from "../../patterns-C0vJBvXO.js";
//#region src/prism/languages/aql.js
languages.aql = {
"comment": clikeComment,
"property": {
pattern: /([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:\\.|(?!\2)[^\\\n])*\2)(?=\s*:)/g,
lookbehind: true
},
"string": /(["'])(?:\\.|(?!\1)[^\\\n])*\1/g,
"identifier": /([´`])(?:\\.|(?!\1)[^\\\n])*\1/g,
"variable": /@@?\w+/,
"keyword": [
{
pattern: /(\with\s+)count(?=\s+into\b)/i,
lookbehind: true
},
/\b(?:aggregate|all|an[dy]|asc|collect|desc|distinct|filter|f?or|graph|in|inbound|insert|into|k_paths|k_shortest_paths|let|like|limit|none|not|null|outbound|remove|replace|return|shortest_path|sort|update|upsert|window|with)\b/i,
{
pattern: /(^|[^\w.[])(?:keep|prune|search|to)\b/i,
lookbehind: true
},
{
pattern: /(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,
lookbehind: true
},
/\options(?=\s*\{)/i
],
"function": /\b(?!\d)\w+(?=\s*\()/,
"boolean": /\b(?:false|true)\b/i,
"range": {
pattern: /\.\./,
alias: "operator"
},
"number": [
/\b0b[01]+/i,
/\b0x[a-f\d]+/i,
/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i
],
"operator": /\*{2,}|[!=]~|[!=<>]=?|&&|\|\||[*/%+-]/,
"punctuation": /::|[()[\]{}.,:;?]/
};
//#endregion
//# sourceMappingURL=aql.js.map