aboutsummaryrefslogtreecommitdiffstats
path: root/public/prism/prism-clike.min.js
blob: aebeff96249fb9645a565a2a5a69f544700f47a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Prism.languages.clike = {
  comment: [
    { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 },
    { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 },
  ],
  string: {
    pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
    greedy: !0,
  },
  'class-name': {
    pattern:
      /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
    lookbehind: !0,
    inside: { punctuation: /[.\\]/ },
  },
  keyword:
    /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
  boolean: /\b(?:false|true)\b/,
  function: /\b\w+(?=\()/,
  number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
  operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
  punctuation: /[{}[\];(),.:]/,
};
320' href='#n320'>320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745
!(function (e) {
  var t = {
      function:
        /\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/,
    },
    s = { number: /\\[^\s']|%\w/ },
    i = {
      comment: [
        { pattern: /(^|\s)(?:! .*|!$)/, lookbehind: !0, inside: t },
        {
          pattern: /(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,
          lookbehind: !0,
          greedy: !0,
          inside: t,
        },
        {
          pattern: /(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
          lookbehind: !0,
          greedy: !0,
          inside: t,
        },
      ],
      number: [
        { pattern: /(^|\s)[+-]?\d+(?=\s|$)/, lookbehind: !0 },
        {
          pattern: /(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,
          lookbehind: !0,
        },
        { pattern: /(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/, lookbehind: !0 },
        { pattern: /(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/, lookbehind: !0 },
        { pattern: /(^|\s)-\d+-\d+\/\d+(?=\s|$)/, lookbehind: !0 },
        {
          pattern:
            /(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,
          lookbehind: !0,
        },
        { pattern: /(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/, lookbehind: !0 },
        {
          pattern:
            /(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,
          lookbehind: !0,
        },
      ],
      regexp: {
        pattern:
          /(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,
        lookbehind: !0,
        alias: 'number',
        inside: {
          variable: /\\\S/,
          keyword: /[+?*\[\]^$(){}.|]/,
          operator: { pattern: /(\/)[idmsr]+(?:-[idmsr]+)?/, lookbehind: !0 },
        },
      },
      boolean: { pattern: /(^|\s)[tf](?=\s|$)/, lookbehind: !0 },
      'custom-string': {
        pattern: /(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,
        lookbehind: !0,
        greedy: !0,
        alias: 'string',
        inside: { number: /\\\S|%\w|\// },
      },
      'multiline-string': [
        {
          pattern: /(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,
          lookbehind: !0,
          greedy: !0,
          alias: 'string',
          inside: {
            number: s.number,
            'semicolon-or-setlocal': {
              pattern: /([\r\n][ \t]*);(?=\s|$)/,
              lookbehind: !0,
              alias: 'function',
            },
          },
        },
        {
          pattern: /(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,
          lookbehind: !0,
          greedy: !0,
          alias: 'string',
          inside: s,
        },
        {
          pattern: /(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
          lookbehind: !0,
          greedy: !0,
          alias: 'string',
          inside: s,
        },
      ],
      'special-using': {
        pattern: /(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,
        lookbehind: !0,
        alias: 'function',
        inside: { string: { pattern: /(\s)[^:\s]+/, lookbehind: !0 } },
      },
      'stack-effect-delimiter': [
        {
          pattern: /(^|\s)(?:call|eval|execute)?\((?=\s)/,
          lookbehind: !0,
          alias: 'operator',
        },
        { pattern: /(\s)--(?=\s)/, lookbehind: !0, alias: 'operator' },
        { pattern: /(\s)\)(?=\s|$)/, lookbehind: !0, alias: 'operator' },
      ],
      combinators: { pattern: null, lookbehind: !0, alias: 'keyword' },
      'kernel-builtin': { pattern: null, lookbehind: !0, alias: 'variable' },
      'sequences-builtin': { pattern: null, lookbehind: !0, alias: 'variable' },
      'math-builtin': { pattern: null, lookbehind: !0, alias: 'variable' },
      'constructor-word': {
        pattern: /(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,
        lookbehind: !0,
        alias: 'keyword',
      },
      'other-builtin-syntax': {
        pattern: null,
        lookbehind: !0,
        alias: 'operator',
      },
      'conventionally-named-word': {
        pattern:
          /(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,
        lookbehind: !0,
        alias: 'keyword',
      },
      'colon-syntax': {
        pattern: /(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,
        lookbehind: !0,
        greedy: !0,
        alias: 'function',
      },
      'semicolon-or-setlocal': {
        pattern: /(\s)(?:;|:>)(?=\s|$)/,
        lookbehind: !0,
        alias: 'function',
      },
      'curly-brace-literal-delimiter': [
        { pattern: /(^|\s)[a-z]*\{(?=\s)/i, lookbehind: !0, alias: 'operator' },
        { pattern: /(\s)\}(?=\s|$)/, lookbehind: !0, alias: 'operator' },
      ],
      'quotation-delimiter': [
        { pattern: /(^|\s)\[(?=\s)/, lookbehind: !0, alias: 'operator' },
        { pattern: /(\s)\](?=\s|$)/, lookbehind: !0, alias: 'operator' },
      ],
      'normal-word': { pattern: /(^|\s)[^"\s]\S*(?=\s|$)/, lookbehind: !0 },
      string: { pattern: /"(?:\\\S|[^"\\])*"/, greedy: !0, inside: s },
    },
    n = function (e) {
      return (e + '').replace(/([.?*+\^$\[\]\\(){}|\-])/g, '\\$1');
    },
    r = function (e) {
      return new RegExp('(^|\\s)(?:' + e.map(n).join('|') + ')(?=\\s|$)');
    },
    a = {
      'kernel-builtin': [
        'or',
        '2nipd',
        '4drop',
        'tuck',
        'wrapper',
        'nip',
        'wrapper?',
        'callstack>array',
        'die',
        'dupd',
        'callstack',
        'callstack?',
        '3dup',
        'hashcode',
        'pick',
        '4nip',
        'build',
        '>boolean',
        'nipd',
        'clone',
        '5nip',
        'eq?',
        '?',
        '=',
        'swapd',
        '2over',
        'clear',
        '2dup',
        'get-retainstack',
        'not',
        'tuple?',
        'dup',
        '3nipd',
        'call',
        '-rotd',
        'object',
        'drop',
        'assert=',
        'assert?',
        '-rot',
        'execute',
        'boa',
        'get-callstack',
        'curried?',
        '3drop',
        'pickd',
        'overd',
        'over',
        'roll',
        '3nip',
        'swap',
        'and',
        '2nip',
        'rotd',
        'throw',
        '(clone)',
        'hashcode*',
        'spin',
        'reach',
        '4dup',
        'equal?',
        'get-datastack',
        'assert',
        '2drop',
        '<wrapper>',
        'boolean?',
        'identity-hashcode',
        'identity-tuple?',
        'null',
        'composed?',
        'new',
        '5drop',
        'rot',
        '-roll',
        'xor',
        'identity-tuple',
        'boolean',
      ],
      'other-builtin-syntax': [
        '=======',
        'recursive',
        'flushable',
        '>>',
        '<<<<<<',
        'M\\',
        'B',
        'PRIVATE>',
        '\\',
        '======',
        'final',
        'inline',
        'delimiter',
        'deprecated',
        '<PRIVATE',
        '>>>>>>',
        '<<<<<<<',
        'parse-complex',
        'malformed-complex',
        'read-only',
        '>>>>>>>',
        'call-next-method',
        '<<',
        'foldable',
        '$',
        '$[',
        '${',
      ],
      'sequences-builtin': [
        'member-eq?',
        'mismatch',
        'append',
        'assert-sequence=',
        'longer',
        'repetition',
        'clone-like',
        '3sequence',
        'assert-sequence?',
        'last-index-from',
        'reversed',
        'index-from',
        'cut*',
        'pad-tail',
        'join-as',
        'remove-eq!',
        'concat-as',
        'but-last',
        'snip',
        'nths',
        'nth',
        'sequence',
        'longest',
        'slice?',
        '<slice>',
        'remove-nth',
        'tail-slice',
        'empty?',
        'tail*',
        'member?',
        'virtual-sequence?',
        'set-length',
        'drop-prefix',
        'iota',
        'unclip',
        'bounds-error?',
        'unclip-last-slice',
        'non-negative-integer-expected',
        'non-negative-integer-expected?',
        'midpoint@',
        'longer?',
        '?set-nth',
        '?first',
        'rest-slice',
        'prepend-as',
        'prepend',
        'fourth',
        'sift',
        'subseq-start',
        'new-sequence',
        '?last',
        'like',
        'first4',
        '1sequence',
        'reverse',
        'slice',
        'virtual@',
        'repetition?',
        'set-last',
        'index',
        '4sequence',
        'max-length',
        'set-second',
        'immutable-sequence',
        'first2',
        'first3',
        'supremum',
        'unclip-slice',
        'suffix!',
        'insert-nth',
        'tail',
        '3append',
        'short',
        'suffix',
        'concat',
        'flip',
        'immutable?',
        'reverse!',
        '2sequence',
        'sum',
        'delete-all',
        'indices',
        'snip-slice',
        '<iota>',
        'check-slice',
        'sequence?',
        'head',
        'append-as',
        'halves',
        'sequence=',
        'collapse-slice',
        '?second',
        'slice-error?',
        'product',
        'bounds-check?',
        'bounds-check',
        'immutable',
        'virtual-exemplar',
        'harvest',
        'remove',
        'pad-head',
        'last',
        'set-fourth',
        'cartesian-product',
        'remove-eq',
        'shorten',
        'shorter',
        'reversed?',
        'shorter?',
        'shortest',
        'head-slice',
        'pop*',
        'tail-slice*',
        'but-last-slice',
        'iota?',
        'append!',
        'cut-slice',
        'new-resizable',
        'head-slice*',
        'sequence-hashcode',
        'pop',
        'set-nth',
        '?nth',
        'second',
        'join',
        'immutable-sequence?',
        '<reversed>',
        '3append-as',
        'virtual-sequence',
        'subseq?',
        'remove-nth!',
        'length',
        'last-index',
        'lengthen',
        'assert-sequence',
        'copy',
        'move',
        'third',
        'first',
        'tail?',
        'set-first',
        'prefix',
        'bounds-error',
        '<repetition>',
        'exchange',
        'surround',
        'cut',
        'min-length',
        'set-third',
        'push-all',
        'head?',
        'subseq-start-from',
        'delete-slice',
        'rest',
        'sum-lengths',
        'head*',
        'infimum',
        'remove!',
        'glue',
        'slice-error',
        'subseq',
        'push',
        'replace-slice',
        'subseq-as',
        'unclip-last',
      ],
      'math-builtin': [
        'number=',
        'next-power-of-2',
        '?1+',
        'fp-special?',
        'imaginary-part',
        'float>bits',
        'number?',
        'fp-infinity?',
        'bignum?',
        'fp-snan?',
        'denominator',
        'gcd',
        '*',
        '+',
        'fp-bitwise=',
        '-',
        'u>=',
        '/',
        '>=',
        'bitand',
        'power-of-2?',
        'log2-expects-positive',
        'neg?',
        '<',
        'log2',
        '>',
        'integer?',
        'number',
        'bits>double',
        '2/',
        'zero?',
        'bits>float',
        'float?',
        'shift',
        'ratio?',
        'rect>',
        'even?',
        'ratio',
        'fp-sign',
        'bitnot',
        '>fixnum',
        'complex?',
        '/i',
        'integer>fixnum',
        '/f',
        'sgn',
        '>bignum',
        'next-float',
        'u<',
        'u>',
        'mod',
        'recip',
        'rational',
        '>float',
        '2^',
        'integer',
        'fixnum?',
        'neg',
        'fixnum',
        'sq',
        'bignum',
        '>rect',
        'bit?',
        'fp-qnan?',
        'simple-gcd',
        'complex',
        '<fp-nan>',
        'real',
        '>fraction',
        'double>bits',
        'bitor',
        'rem',
        'fp-nan-payload',
        'real-part',
        'log2-expects-positive?',
        'prev-float',
        'align',
        'unordered?',
        'float',
        'fp-nan?',
        'abs',
        'bitxor',
        'integer>fixnum-strict',
        'u<=',
        'odd?',
        '<=',
        '/mod',
        '>integer',
        'real?',
        'rational?',
        'numerator',
      ],
    };
  Object.keys(a).forEach(function (e) {
    i[e].pattern = r(a[e]);
  });
  (i.combinators.pattern = r([
    '2bi',
    'while',
    '2tri',
    'bi*',
    '4dip',
    'both?',
    'same?',
    'tri@',
    'curry',
    'prepose',
    '3bi',
    '?if',
    'tri*',
    '2keep',
    '3keep',
    'curried',
    '2keepd',
    'when',
    '2bi*',
    '2tri*',
    '4keep',
    'bi@',
    'keepdd',
    'do',
    'unless*',
    'tri-curry',
    'if*',
    'loop',
    'bi-curry*',
    'when*',
    '2bi@',
    '2tri@',
    'with',
    '2with',
    'either?',
    'bi',
    'until',
    '3dip',
    '3curry',
    'tri-curry*',
    'tri-curry@',
    'bi-curry',
    'keepd',
    'compose',
    '2dip',
    'if',
    '3tri',
    'unless',
    'tuple',
    'keep',
    '2curry',
    'tri',
    'most',
    'while*',
    'dip',
    'composed',
    'bi-curry@',
    'find-last-from',
    'trim-head-slice',
    'map-as',
    'each-from',
    'none?',
    'trim-tail',
    'partition',
    'if-empty',
    'accumulate*',
    'reject!',
    'find-from',
    'accumulate-as',
    'collector-for-as',
    'reject',
    'map',
    'map-sum',
    'accumulate!',
    '2each-from',
    'follow',
    'supremum-by',
    'map!',
    'unless-empty',
    'collector',
    'padding',
    'reduce-index',
    'replicate-as',
    'infimum-by',
    'trim-tail-slice',
    'count',
    'find-index',
    'filter',
    'accumulate*!',
    'reject-as',
    'map-integers',
    'map-find',
    'reduce',
    'selector',
    'interleave',
    '2map',
    'filter-as',
    'binary-reduce',
    'map-index-as',
    'find',
    'produce',
    'filter!',
    'replicate',
    'cartesian-map',
    'cartesian-each',
    'find-index-from',
    'map-find-last',
    '3map-as',
    '3map',
    'find-last',
    'selector-as',
    '2map-as',
    '2map-reduce',
    'accumulate',
    'each',
    'each-index',
    'accumulate*-as',
    'when-empty',
    'all?',
    'collector-as',
    'push-either',
    'new-like',
    'collector-for',
    '2selector',
    'push-if',
    '2all?',
    'map-reduce',
    '3each',
    'any?',
    'trim-slice',
    '2reduce',
    'change-nth',
    'produce-as',
    '2each',
    'trim',
    'trim-head',
    'cartesian-find',
    'map-index',
    'if-zero',
    'each-integer',
    'unless-zero',
    '(find-integer)',
    'when-zero',
    'find-last-integer',
    '(all-integers?)',
    'times',
    '(each-integer)',
    'find-integer',
    'all-integers?',
    'unless-negative',
    'if-positive',
    'when-positive',
    'when-negative',
    'unless-positive',
    'if-negative',
    'case',
    '2cleave',
    'cond>quot',
    'case>quot',
    '3cleave',
    'wrong-values',
    'to-fixed-point',
    'alist>quot',
    'cond',
    'cleave',
    'call-effect',
    'recursive-hashcode',
    'spread',
    'deep-spread>quot',
    '2||',
    '0||',
    'n||',
    '0&&',
    '2&&',
    '3||',
    '1||',
    '1&&',
    'n&&',
    '3&&',
    'smart-unless*',
    'keep-inputs',
    'reduce-outputs',
    'smart-when*',
    'cleave>array',
    'smart-with',
    'smart-apply',
    'smart-if',
    'inputs/outputs',
    'output>sequence-n',
    'map-outputs',
    'map-reduce-outputs',
    'dropping',
    'output>array',
    'smart-map-reduce',
    'smart-2map-reduce',
    'output>array-n',
    'nullary',
    'input<sequence',
    'append-outputs',
    'drop-inputs',
    'inputs',
    'smart-2reduce',
    'drop-outputs',
    'smart-reduce',
    'preserving',
    'smart-when',
    'outputs',
    'append-outputs-as',
    'smart-unless',
    'smart-if*',
    'sum-outputs',
    'input<sequence-unsafe',
    'output>sequence',
  ])),
    (e.languages.factor = i);
})(Prism);