Prism.languages.ada = { comment: /--.*/, string: /"(?:""|[^"\r\f\n])*"/, number: [ { pattern: /\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i, }, { pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i, }, ], 'attr-name': /\b'\w+/, keyword: /\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i, boolean: /\b(?:false|true)\b/i, operator: /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/, punctuation: /\.\.?|[,;():]/, char: /'.'/, variable: /\b[a-z](?:\w)*\b/i, }; b90cef9dfbe4288e148d589d033'/> The frontend of my personal website.Armand Philippot
summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-bison.min.js
blob: 0b35fc5d9e6dbb707e3b22543b05e81611f04ca3 (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
(Prism.languages.bison = Prism.languages.extend('c', {})),
  Prism.languages.insertBefore('bison', 'comment', {
    bison: {
      pattern: /^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,
      inside: {
        c: {
          pattern: /%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,
          inside: {
            delimiter: { pattern: /^%?\{|%?\}$/, alias: 'punctuation' },
            'bison-variable': {
              pattern: /[$@](?:<[^\s>]+>)?[\w$]+/,
              alias: 'variable',
              inside: { punctuation: /<|>/ },
            },
            rest: Prism.languages.c,
          },
        },
        comment: Prism.languages.c.comment,
        string: Prism.languages.c.string,
        property: /\S+(?=:)/,
        keyword: /%\w+/,
        number: { pattern: /(^|[^@])\b(?:0x[\da-f]+|\d+)/i, lookbehind: !0 },
        punctuation: /%[%?]|[|:;\[\]<>]/,
      },
    },
  });