summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-bsl.min.js
blob: 7076214e575daa6ca6b04aae28faf7ca60de2d8d (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(Prism.languages.bsl = {
  comment: /\/\/.*/,
  string: [
    { pattern: /"(?:[^"]|"")*"(?!")/, greedy: !0 },
    { pattern: /'(?:[^'\r\n\\]|\\.)*'/ },
  ],
  keyword: [
    {
      pattern:
        /(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,
      lookbehind: !0,
    },
    {
      pattern:
        /\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i,
    },
  ],
  number: {
    pattern:
      /(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,
    lookbehind: !0,
  },
  operator: [
    /[<>+\-*/]=?|[%=]/,
    {
      pattern:
        /(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,
      lookbehind: !0,
    },
    { pattern: /\b(?:and|not|or)\b/i },
  ],
  punctuation: /\(\.|\.\)|[()\[\]:;,.]/,
  directive: [
    {
      pattern: /^([ \t]*)&.*/m,
      lookbehind: !0,
      greedy: !0,
      alias: 'important',
    },
    {
      pattern: /^([ \t]*)#.*/gm,
      lookbehind: !0,
      greedy: !0,
      alias: 'important',
    },
  ],
}),
  (Prism.languages.oscript = Prism.languages.bsl);
pan>'interpolation-punctuation': { pattern: /^\$\{|\}$/, alias: 'punctuation', }, rest: null, }, }, }, }, ], keyword: /\b(?:as)\b/, boolean: /\b(?:false|true)\b/, 'builtin-function': { pattern: /((?:^|[^?])\?\s*)\w+/, lookbehind: !0, alias: 'function', }, function: /\b\w+(?=\s*\()/, number: /\b\d+(?:\.\d+)?\b/, operator: /\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/, punctuation: /[,;.:()[\]{}]/, }; (t.string[1].inside.interpolation.inside.rest = t), (n.languages.ftl = { 'ftl-comment': { pattern: /^<#--[\s\S]*/, alias: 'comment' }, 'ftl-directive': { pattern: /^<[\s\S]+>$/, inside: { directive: { pattern: /(^<\/?)[#@][a-z]\w*/i, lookbehind: !0, alias: 'keyword', }, punctuation: /^<\/?|\/?>$/, content: { pattern: /\s*\S[\s\S]*/, alias: 'ftl', inside: t }, }, }, 'ftl-interpolation': { pattern: /^\$\{[\s\S]*\}$/, inside: { punctuation: /^\$\{|\}$/, content: { pattern: /\s*\S[\s\S]*/, alias: 'ftl', inside: t }, }, }, }), n.hooks.add('before-tokenize', function (e) { var t = RegExp( '<#--[^]*?--\x3e|</?[#@][a-zA-Z](?:<expr>)*?>|\\$\\{(?:<expr>)*?\\}'.replace( /<expr>/g, function () { return i; } ), 'gi' ); n.languages['markup-templating'].buildPlaceholders(e, 'ftl', t); }), n.hooks.add('after-tokenize', function (e) { n.languages['markup-templating'].tokenizePlaceholders(e, 'ftl'); }); })(Prism);