summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-phpdoc.min.js
blob: dd0e30981a2ce9f984fc6eb5a54e4ce12b110f95 (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
!(function (a) {
  var e = '(?:\\b[a-zA-Z]\\w*|[|\\\\[\\]])+';
  (a.languages.phpdoc = a.languages.extend('javadoclike', {
    parameter: {
      pattern: RegExp(
        '(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:' +
          e +
          '\\s+)?)\\$\\w+'
      ),
      lookbehind: !0,
    },
  })),
    a.languages.insertBefore('phpdoc', 'keyword', {
      'class-name': [
        {
          pattern: RegExp(
            '(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)' +
              e
          ),
          lookbehind: !0,
          inside: {
            keyword:
              /\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,
            punctuation: /[|\\[\]()]/,
          },
        },
      ],
    }),
    a.languages.javadoclike.addSupport('php', a.languages.phpdoc);
})(Prism);
an>/\./, }, }, // These are builtin variables only. Constructors are highlighted later as a constant. builtin: /\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/, // decimal integers and floating point numbers | octal integers | hexadecimal integers number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i, operator: [ { // infix operator pattern: /`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/, greedy: true, }, { // function composition pattern: /(\s)\.(?=\s)/, lookbehind: true, }, // Most of this is needed because of the meaning of a single '.'. // If it stands alone freely, it is the function composition. // It may also be a separator between a module name and an identifier => no // operator. If it comes together with other special characters it is an // operator too. // // This regex means: /[-!#$%*+=?&@|~.:<>^\\\/]+/ without /\./. /[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/, ], // In Haskell, nearly everything is a variable, do not highlight these. hvariable: { pattern: /\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/, inside: { punctuation: /\./, }, }, constant: { pattern: /\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/, inside: { punctuation: /\./, }, }, punctuation: /[{}[\];(),.:]/, }; Prism.languages.hs = Prism.languages.haskell;