Urara-Blog/node_modules/.pnpm-store/v3/files/97/7588167dc9d6f8b4e7555ad5fca1a5a54e0fc0159e3fc3443a0e578417dd3d34cfdbd30f035c2a02b63ff8a482d971fda7b507cce4bc9e47bbea0cd079ee0c
2022-08-14 01:14:53 +08:00

49 lines
1.3 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Prism.languages.aql = {
'comment': /\/\/.*|\/\*[\s\S]*?\*\//,
'property': {
pattern: /([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,
lookbehind: true,
greedy: true
},
'string': {
pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
greedy: true
},
'identifier': {
pattern: /([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
greedy: true
},
'variable': /@@?\w+/,
'keyword': [
{
pattern: /(\bWITH\s+)COUNT(?=\s+INTO\b)/i,
lookbehind: true
},
/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,
// pseudo keywords get a lookbehind to avoid false positives
{
pattern: /(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,
lookbehind: true
},
{
pattern: /(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,
lookbehind: true
},
{
pattern: /\bOPTIONS(?=\s*\{)/i
}
],
'function': /\b(?!\d)\w+(?=\s*\()/,
'boolean': /\b(?:false|true)\b/i,
'range': {
pattern: /\.\./,
alias: 'operator'
},
'number': [
/\b0b[01]+/i,
/\b0x[0-9a-f]+/i,
/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i
],
'operator': /\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,
'punctuation': /::|[?.:,;()[\]{}]/
};