!(function (s) { function a(e, s) { return e.replace(/<<(\d+)>>/g, function (e, n) { return '(?:' + s[+n] + ')'; }); } function t(e, n, s) { return RegExp(a(e, n), s || ''); } function e(e, n) { for (var s = 0; s < n; s++) e = e.replace(/<>/g, function () { return '(?:' + e + ')'; }); return e.replace(/<>/g, '[^\\s\\S]'); } var n = 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void', r = 'class enum interface record struct', i = 'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)', o = 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'; function l(e) { return '\\b(?:' + e.trim().replace(/ /g, '|') + ')\\b'; } var d = l(r), p = RegExp(l(n + ' ' + r + ' ' + i + ' ' + o)), c = l(r + ' ' + i + ' ' + o), u = l(n + ' ' + r + ' ' + o), g = e('<(?:[^<>;=+\\-*/%&|^]|<>)*>', 2), b = e('\\((?:[^()]|<>)*\\)', 2), h = '@?\\b[A-Za-z_]\\w*\\b', f = a('<<0>>(?:\\s*<<1>>)?', [h, g]), m = a('(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*', [c, f]), k = '\\[\\s*(?:,\\s*)*\\]', y = a('<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?', [m, k]), w = a('(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?', [ a('\\(<<0>>+(?:,<<0>>+)+\\)', [ a('[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>', [g, b, k]), ]), m, k, ]), v = { keyword: p, punctuation: /[<>()?,.:[\]]/ }, x = "'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'", $ = '"(?:\\\\.|[^\\\\"\r\n])*"'; (s.languages.csharp = s.languages.extend('clike', { string: [ { pattern: t('(^|[^$\\\\])<<0>>', ['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']), lookbehind: !0, greedy: !0, }, { pattern: t('(^|[^@$\\\\])<<0>>', [$]), lookbehind: !0, greedy: !0 }, ], 'class-name': [ { pattern: t('(\\busing\\s+static\\s+)<<0>>(?=\\s*;)', [m]), lookbehind: !0, inside: v, }, { pattern: t('(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)', [h, w]), lookbehind: !0, inside: v, }, { pattern: t('(\\busing\\s+)<<0>>(?=\\s*=)', [h]), lookbehind: !0 }, { pattern: t('(\\b<<0>>\\s+)<<1>>', [d, f]), lookbehind: !0, inside: v }, { pattern: t('(\\bcatch\\s*\\(\\s*)<<0>>', [m]), lookbehind: !0, inside: v, }, { pattern: t('(\\bwhere\\s+)<<0>>', [h]), lookbehind: !0 }, { pattern: t('(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>', [y]), lookbehind: !0, inside: v, }, { pattern: t( '\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))', [w, u, h] ), inside: v, }, ], keyword: p, number: /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i, operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/, punctuation: /\?\.?|::|[{}[\];(),.:]/, })), s.languages.insertBefore('csharp', 'number', { range: { pattern: /\.\./, alias: 'operator' }, }), s.languages.insertBefore('csharp', 'punctuation', { 'named-parameter': { pattern: t('([(,]\\s*)<<0>>(?=\\s*:)', [h]), lookbehind: !0, alias: 'punctuation', }, }), s.languages.insertBefore('csharp', 'class-name', { namespace: { pattern: t( '(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])', [h] ), lookbehind: !0, inside: { punctuation: /\./ }, }, 'type-expression': { pattern: t( '(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))', [b] ), lookbehind: !0, alias: 'class-name', inside: v, }, 'return-type': { pattern: t( '<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))', [w, m] ), inside: v, alias: 'class-name', }, 'constructor-invocation': { pattern: t('(\\bnew\\s+)<<0>>(?=\\s*[[({])', [w]), lookbehind: !0, inside: v, alias: 'class-name', }, 'generic-method': { pattern: t('<<0>>\\s*<<1>>(?=\\s*\\()', [h, g]), inside: { function: t('^<<0>>', [h]), generic: { pattern: RegExp(g), alias: 'class-name', inside: v }, }, }, 'type-list': { pattern: t( '\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))', [d, f, h, w, p.source, b, '\\bnew\\s*\\(\\s*\\)'] ), lookbehind: !0, inside: { 'record-arguments': { pattern: t('(^(?!new\\s*\\()<<0>>\\s*)<<1>>', [f, b]), lookbehind: !0, greedy: !0, inside: s.languages.csharp, }, keyword: p, 'class-name': { pattern: RegExp(w), greedy: !0, inside: v }, punctuation: /[,()]/, }, }, preprocessor: { pattern: /(^[\t ]*)#.*/m, lookbehind: !0, alias: 'property', inside: { directive: { pattern: /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/, lookbehind: !0, alias: 'keyword', }, }, }, }); var _ = $ + '|' + x, B = a('/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>', [_]), E = e(a('[^"\'/()]|<<0>>|\\(<>*\\)', [B]), 2), R = '\\b(?:assembly|event|field|method|module|param|property|return|type)\\b', z = a('<<0>>(?:\\s*\\(<<1>>*\\))?', [m, E]); s.languages.insertBefore('csharp', 'class-name', { attribute: { pattern: t( '((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])', [R, z] ), lookbehind: !0, greedy: !0, inside: { target: { pattern: t('^<<0>>(?=\\s*:)', [R]), alias: 'keyword' }, 'attribute-arguments': { pattern: t('\\(<<0>>*\\)', [E]), inside: s.languages.csharp, }, 'class-name': { pattern: RegExp(m), inside: { punctuation: /\./ } }, punctuation: /[:,]/, }, }, }); var S = ':[^}\r\n]+', j = e(a('[^"\'/()]|<<0>>|\\(<>*\\)', [B]), 2), A = a('\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}', [j, S]), F = e( a('[^"\'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)', [ _, ]), 2 ), P = a('\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}', [F, S]); function U(e, n) { return { interpolation: { pattern: t('((?:^|[^{])(?:\\{\\{)*)<<0>>', [e]), lookbehind: !0, inside: { 'format-string': { pattern: t('(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)', [n, S]), lookbehind: !0, inside: { punctuation: /^:/ }, }, punctuation: /^\{|\}$/, expression: { pattern: /[\s\S]+/, alias: 'language-csharp', inside: s.languages.csharp, }, }, }, string: /[\s\S]+/, }; } s.languages.insertBefore('csharp', 'string', { 'interpolation-string': [ { pattern: t( '(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"', [A] ), lookbehind: !0, greedy: !0, inside: U(A, j), }, { pattern: t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"', [P]), lookbehind: !0, greedy: !0, inside: U(P, F), }, ], char: { pattern: RegExp(x), greedy: !0 }, }), (s.languages.dotnet = s.languages.cs = s.languages.csharp); })(Prism); hlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
(function (Prism) {
  var variable = /%%?[~:\w]+%?|!\S+!/;
  var parameter = {
    pattern: /\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,
    alias: 'attr-name',
    inside: {
      punctuation: /:/,
    },
  };
  var string = /"(?:[\\"]"|[^"])*"(?!")/;
  var number = /(?:\b|-)\d+\b/;

  Prism.languages.batch = {
    comment: [
      /^::.*/m,
      {
        pattern: /((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,
        lookbehind: true,
      },
    ],
    label: {
      pattern: /^:.*/m,
      alias: 'property',
    },
    command: [
      {
        // FOR command
        pattern:
          /((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,
        lookbehind: true,
        inside: {
          keyword: /\b(?:do|in)\b|^for\b/i,
          string: string,
          parameter: parameter,
          variable: variable,
          number: number,
          punctuation: /[()',]/,
        },
      },
      {
        // IF command
        pattern:
          /((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,
        lookbehind: true,
        inside: {
          keyword: /\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,
          string: string,
          parameter: parameter,
          variable: variable,
          number: number,
          operator: /\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i,
        },
      },
      {
        // ELSE command
        pattern: /((?:^|[&()])[ \t]*)else\b/im,
        lookbehind: true,
        inside: {
          keyword: /^else\b/i,
        },
      },
      {
        // SET command
        pattern:
          /((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,
        lookbehind: true,
        inside: {
          keyword: /^set\b/i,
          string: string,
          parameter: parameter,
          variable: [variable, /\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],
          number: number,
          operator: /[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,
          punctuation: /[()',]/,
        },
      },
      {
        // Other commands
        pattern:
          /((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,
        lookbehind: true,
        inside: {
          keyword: /^\w+\b/,
          string: string,
          parameter: parameter,
          label: {
            pattern: /(^\s*):\S+/m,
            lookbehind: true,
            alias: 'property',
          },
          variable: variable,
          number: number,
          operator: /\^/,
        },
      },
    ],
    operator: /[&@]/,
    punctuation: /[()']/,
  };
})(Prism);