summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-nasm.js
Commit message (Expand)AuthorAgeFilesLines
* chore: add prismjs for syntax highlightingArmand Philippot2021-12-301-0/+26
href='#n22'>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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
!(function (e) {
  for (
    var n =
        '\\((?:[^();"#\\\\]|\\\\[^]|;.*(?!.)|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[^])*#\\}|[^{])|<expr>)*\\)',
      i = 0;
    i < 5;
    i++
  )
    n = n.replace(/<expr>/g, function () {
      return n;
    });
  n = n.replace(/<expr>/g, '[^\\s\\S]');
  var d = (e.languages.lilypond = {
    comment: /%(?:(?!\{).*|\{[\s\S]*?%\})/,
    'embedded-scheme': {
      pattern: RegExp(
        '(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|<expr>))'.replace(
          /<expr>/g,
          function () {
            return n;
          }
        ),
        'm'
      ),
      lookbehind: !0,
      greedy: !0,
      inside: {
        scheme: {
          pattern: /^(#)[\s\S]+$/,
          lookbehind: !0,
          alias: 'language-scheme',
          inside: {
            'embedded-lilypond': {
              pattern: /#\{[\s\S]*?#\}/,
              greedy: !0,
              inside: {
                punctuation: /^#\{|#\}$/,
                lilypond: {
                  pattern: /[\s\S]+/,
                  alias: 'language-lilypond',
                  inside: null,
                },
              },
            },
            rest: e.languages.scheme,
          },
        },
        punctuation: /#/,
      },
    },
    string: { pattern: /"(?:[^"\\]|\\.)*"/, greedy: !0 },
    'class-name': { pattern: /(\\new\s+)[\w-]+/, lookbehind: !0 },
    keyword: { pattern: /\\[a-z][-\w]*/i, inside: { punctuation: /^\\/ } },
    operator: /[=|]|<<|>>/,
    punctuation: {
      pattern:
        /(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,
      lookbehind: !0,
    },
    number: /\b\d+(?:\/\d+)?\b/,
  });
  (d['embedded-scheme'].inside.scheme.inside[
    'embedded-lilypond'
  ].inside.lilypond.inside = d),
    (e.languages.ly = d);
})(Prism);