summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-aql.min.js
blob: 397b76ea523425a2e8155bc3f96bf25b42f3058c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
!(function (t) {
  (t.languages.tt2 = t.languages.extend('clike', {
    comment: /#.*|\[%#[\s\S]*?%\]/,
    keyword:
      /\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,
    punctuation: /[[\]{},()]/,
  })),
    t.languages.insertBefore('tt2', 'number', {
      operator: /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,
      variable: { pattern: /\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i },
    }),
    t.languages.insertBefore('tt2', 'keyword', {
      delimiter: { pattern: /^(?:\[%|%%)-?|-?%\]$/, alias: 'punctuation' },
    }),
    t.languages.insertBefore('tt2', 'string', {
      'single-quoted-string': {
        pattern: /'[^\\']*(?:\\[\s\S][^\\']*)*'/,
        greedy: !0,
        alias: 'string',
      },
      'double-quoted-string': {
        pattern: /"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,
        greedy: !0,
        alias: 'string',
        inside: {
          variable: { pattern: /\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i
n> t.languages.tt2.string, t.hooks.add('before-tokenize', function (e) { t.languages['markup-templating'].buildPlaceholders( e, 'tt2', /\[%[\s\S]+?%\]/g ); }), t.hooks.add('after-tokenize', function (e) { t.languages['markup-templating'].tokenizePlaceholders(e, 'tt2'); }); })(Prism);