1
|
{"version":3,"file":"highlight/crystal.js?v=bc1b2ba36dcaf85a0708","mappings":"yFAqUAA,EAAOC,QA9TP,SAAiBC,GACf,MAAMC,EAAa,4BAGbC,EAAoB,gHACpBC,EAAkB,iCAClBC,EAAmB,CACvBC,SAJuB,sBAKvBC,QACE,yYAIFC,QAAS,kBAELC,EAAQ,CACZC,UAAW,QACXC,MAAO,MACPC,IAAK,KACLC,SAAUR,GAENS,EAAY,CAChBJ,UAAW,oBACXK,SAAU,CACR,CACEJ,MAAO,SACPC,IAAK,UAEP,CACED,MAAO,OACPC,IAAK,SAGTC,SAAUR,GAGZ,SAASW,EAAeL,EAAOC,GAC7B,MACIK,EAAW,CACT,CACEN,MAAOA,EACPC,IAAKA,IAIb,OADAK,EAAS,GAAGA,SAAWA,EAChBA,EAET,MAAMC,EAAS,CACbR,UAAW,SACXO,SAAU,CACRhB,EAAKkB,iBACLV,GAEFM,SAAU,CACR,CACEJ,MAAO,IACPC,IAAK,KAEP,CACED,MAAO,IACPC,IAAK,KAEP,CACED,MAAO,IACPC,IAAK,KAEP,CACED,MAAO,aACPC,IAAK,MACLK,SAAUD,EAAe,MAAO,QAElC,CACEL,MAAO,aACPC,IAAK,MACLK,SAAUD,EAAe,MAAO,QAElC,CACEL,MAAO,aACPC,IAAK,KACLK,SAAUD,EAAe,KAAM,OAEjC,CACEL,MAAO,WACPC,IAAK,IACLK,SAAUD,EAAe,IAAK,MAEhC,CACEL,MAAO,aACPC,IAAK,OAEP,CACED,MAAO,UACPC,IAAK,aAGTQ,UAAW,GAEPC,EAAW,CACfX,UAAW,SACXK,SAAU,CACR,CACEJ,MAAO,QACPC,IAAK,MACLK,SAAUD,EAAe,MAAO,QAElC,CACEL,MAAO,QACPC,IAAK,MACLK,SAAUD,EAAe,MAAO,QAElC,CACEL,MAAO,QACPC,IAAK,KACLK,SAAUD,EAAe,KAAM,OAEjC,CACEL,MAAO,MACPC,IAAK,IACLK,SAAUD,EAAe,IAAK,MAEhC,CACEL,MAA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W,GAEb,CACEV,UAAW,WACXkB,cAAe,MACfhB,IAAK,OACLK,SAAU,CACRhB,EAAKwB,QAAQxB,EAAK6B,WAAY,CAC5BnB,MAAOR,EACP4B,YAAY,MAIlB,CACErB,UAAW,WACXkB,cAAe,YACfhB,IAAK,OACLK,SAAU,CACRhB,EAAKwB,QAAQxB,EAAK6B,WAAY,CAC5BnB,MAAOR,EACP4B,YAAY,KAGhBX,UAAW,GAEb,CACEV,UAAW,SACXC,MAAOV,EAAK+B,oBAAsB,YAClCZ,UAAW,GAEb,CACEV,UAAW,SACXC,MAAO,IACPM,SAAU,CACRC,EACA,CACEP,MAAOR,IAGXiB,UAAW,GAEb,CACEV,UAAW,SACXK,SAAU,CACR,CACEJ,MAAO,gBAAkBT,GAE3B,CACES,MAAO,iBAAmBT,GAE5B,CACES,MAAO,uBAAyBT,GAElC,CACES,MAAO,yFAET,CACEA,MAAO,sBAAwBT,IAGnCkB,UAAW,IAMf,OAHAX,EAAMQ,SAAWO,EACjBV,EAAUG,SAAWO,EAAyBS,MAAM,GAE7C,CACLC,KAAM,UACNC,QAAS,CAAE,MACXtB,SAAUR,EACVY,SAAUO","sources":["webpack:///text/node_modules/highlight.js/lib/languages/crystal.js"],"sourcesContent":["/*\nLanguage: Crystal\nAuthor: TSUYUSATO Kitsune <make.just.on@gmail.com>\nWebsite: https://crystal-lang.org\n*/\n\n/** @type LanguageFn */\nfunction crystal(hljs) {\n const INT_SUFFIX = '(_?[ui](8|16|32|64|128))?';\n const FLOAT_SUFFIX = '(_?f(32|64))?';\n const CRYSTAL_IDENT_RE = '[a-zA-Z_]\\\\w*[!?=]?';\n const CRYSTAL_METHOD_RE = '[a-zA-Z_]\\\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\\\*\\\\*|\\\\[\\\\][=?]?';\n const CRYSTAL_PATH_RE = '[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|!)?';\n const CRYSTAL_KEYWORDS = {\n $pattern: CRYSTAL_IDENT_RE,\n keyword:\n 'abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if ' +\n 'include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? ' +\n 'return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield ' +\n '__DIR__ __END_LINE__ __FILE__ __LINE__',\n literal: 'false nil true'\n };\n const SUBST = {\n className: 'subst',\n begin: /#\\{/,\n end: /\\}/,\n keywords: CRYSTAL_KEYWORDS\n };\n const EXPANSION = {\n className: 'template-variable',\n variants: [\n {\n begin: '\\\\{\\\\{',\n end: '\\\\}\\\\}'\n },\n {\n begin: '\\\\{%',\n end: '%\\\\}'\n }\n ],\n keywords: CRYSTAL_KEYWORDS\n };\n\n function recursiveParen(begin, end) {\n const\n contains = [\n {\n begin: begin,\n end: end\n }\n ];\n contains[0].contains = contains;\n return contains;\n }\n const STRING = {\n className: 'string',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n variants: [\n {\n begin: /'/,\n end: /'/\n },\n {\n begin: /\"/,\n end: /\"/\n },\n {\n begin: /`/,\n end: /`/\n },\n {\n begin: '%[Qwi]?\\\\(',\n end: '\\\\)',\n contains: recursiveParen('\\\\(', '\\\\)')\n },\n {\n begin: '%[Qwi]?\\\\[',\n end: '\\\\]',\n contains: recursiveParen('\\\\[', '\\\\]')\n },\n {\n begin: '%[Qwi]?\\\\{',\n end: /\\}/,\n contains: recursiveParen(/\\{/, /\\}/)\n },\n {\n begin: '%[Qwi]?<',\n end: '>',\n contains: recursiveParen('<', '>')\n },\n {\n begin: '%[Qwi]?\\\\|',\n end: '\\\\|'\n },\n {\n begin: /<<-\\w+$/,\n end: /^\\s*\\w+$/\n }\n ],\n relevance: 0\n };\n const Q_STRING = {\n className: 'string',\n variants: [\n {\n begin: '%q\\\\(',\n end: '\\\\)',\n contains: recursiveParen('\\\\(', '\\\\)')\n },\n {\n begin: '%q\\\\[',\n end: '\\\\]',\n contains: recursiveParen('\\\\[', '\\\\]')\n },\n {\n begin: '%q\\\\{',\n end: /\\}/,\n contains: recursiveParen(/\\{/, /\\}/)\n },\n {\n begin: '%q<',\n end: '>',\n contains: recursiveParen('<', '>')\n },\n {\n begin: '%q\\\\|',\n end: '\\\\|'\n },\n {\n begin: /<<-'\\w+'$/,\n end: /^\\s*\\w+$/\n }\n ],\n relevance: 0\n };\n const REGEXP = {\n begin: '(?!%\\\\})(' + hljs.RE_STARTERS_RE + '|\\\\n|\\\\b(case|if|select|unless|until|when|while)\\\\b)\\\\s*',\n keywords: 'case if select unless until when while',\n contains: [\n {\n className: 'regexp',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n variants: [\n {\n begin: '//[a-z]*',\n relevance: 0\n },\n {\n begin: '/(?!\\\\/)',\n end: '/[a-z]*'\n }\n ]\n }\n ],\n relevance: 0\n };\n const REGEXP2 = {\n className: 'regexp',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n variants: [\n {\n begin: '%r\\\\(',\n end: '\\\\)',\n contains: recursiveParen('\\\\(', '\\\\)')\n },\n {\n begin: '%r\\\\[',\n end: '\\\\]',\n contains: recursiveParen('\\\\[', '\\\\]')\n },\n {\n begin: '%r\\\\{',\n end: /\\}/,\n contains: recursiveParen(/\\{/, /\\}/)\n },\n {\n begin: '%r<',\n end: '>',\n contains: recursiveParen('<', '>')\n },\n {\n begin: '%r\\\\|',\n end: '\\\\|'\n }\n ],\n relevance: 0\n };\n const ATTRIBUTE = {\n className: 'meta',\n begin: '@\\\\[',\n end: '\\\\]',\n contains: [\n hljs.inherit(hljs.QUOTE_STRING_MODE, {\n className: 'meta-string'\n })\n ]\n };\n const CRYSTAL_DEFAULT_CONTAINS = [\n EXPANSION,\n STRING,\n Q_STRING,\n REGEXP2,\n REGEXP,\n ATTRIBUTE,\n hljs.HASH_COMMENT_MODE,\n {\n className: 'class',\n beginKeywords: 'class module struct',\n end: '$|;',\n illegal: /=/,\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.inherit(hljs.TITLE_MODE, {\n begin: CRYSTAL_PATH_RE\n }),\n { // relevance booster for inheritance\n begin: '<'\n }\n ]\n },\n {\n className: 'class',\n beginKeywords: 'lib enum union',\n end: '$|;',\n illegal: /=/,\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.inherit(hljs.TITLE_MODE, {\n begin: CRYSTAL_PATH_RE\n })\n ]\n },\n {\n beginKeywords: 'annotation',\n end: '$|;',\n illegal: /=/,\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.inherit(hljs.TITLE_MODE, {\n begin: CRYSTAL_PATH_RE\n })\n ],\n relevance: 2\n },\n {\n className: 'function',\n beginKeywords: 'def',\n end: /\\B\\b/,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {\n begin: CRYSTAL_METHOD_RE,\n endsParent: true\n })\n ]\n },\n {\n className: 'function',\n beginKeywords: 'fun macro',\n end: /\\B\\b/,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {\n begin: CRYSTAL_METHOD_RE,\n endsParent: true\n })\n ],\n relevance: 2\n },\n {\n className: 'symbol',\n begin: hljs.UNDERSCORE_IDENT_RE + '(!|\\\\?)?:',\n relevance: 0\n },\n {\n className: 'symbol',\n begin: ':',\n contains: [\n STRING,\n {\n begin: CRYSTAL_METHOD_RE\n }\n ],\n relevance: 0\n },\n {\n className: 'number',\n variants: [\n {\n begin: '\\\\b0b([01_]+)' + INT_SUFFIX\n },\n {\n begin: '\\\\b0o([0-7_]+)' + INT_SUFFIX\n },\n {\n begin: '\\\\b0x([A-Fa-f0-9_]+)' + INT_SUFFIX\n },\n {\n begin: '\\\\b([1-9][0-9_]*[0-9]|[0-9])(\\\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?' + FLOAT_SUFFIX + '(?!_)'\n },\n {\n begin: '\\\\b([1-9][0-9_]*|0)' + INT_SUFFIX\n }\n ],\n relevance: 0\n }\n ];\n SUBST.contains = CRYSTAL_DEFAULT_CONTAINS;\n EXPANSION.contains = CRYSTAL_DEFAULT_CONTAINS.slice(1); // without EXPANSION\n\n return {\n name: 'Crystal',\n aliases: [ 'cr' ],\n keywords: CRYSTAL_KEYWORDS,\n contains: CRYSTAL_DEFAULT_CONTAINS\n };\n}\n\nmodule.exports = crystal;\n"],"names":["module","exports","hljs","INT_SUFFIX","CRYSTAL_METHOD_RE","CRYSTAL_PATH_RE","CRYSTAL_KEYWORDS","$pattern","keyword","literal","SUBST","className","begin","end","keywords","EXPANSION","variants","recursiveParen","contains","STRING","BACKSLASH_ESCAPE","relevance","Q_STRING","REGEXP","RE_STARTERS_RE","CRYSTAL_DEFAULT_CONTAINS","inherit","QUOTE_STRING_MODE","HASH_COMMENT_MODE","beginKeywords","illegal","TITLE_MODE","endsParent","UNDERSCORE_IDENT_RE","slice","name","aliases"],"sourceRoot":""}
|