hljs.registerLanguage("crystal",function(e){var c="(_*[ui](8|16|32|64|128))?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",b="[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",i={keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},r={cN:"subst",b:"#{",e:"}",k:i},a={cN:"template-variable",v:[{b:"\\{\\{",e:"\\}\\}"},{b:"\\{%",e:"%\\}"}],k:i};function s(e,c){var n=[{b:e,e:c}];return n[0].c=n}var t={cN:"string",c:[e.BE,r],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[Qwi]?\\(",e:"\\)",c:s("\\(","\\)")},{b:"%[Qwi]?\\[",e:"\\]",c:s("\\[","\\]")},{b:"%[Qwi]?{",e:"}",c:s("{","}")},{b:"%[Qwi]?<",e:">",c:s("<",">")},{b:"%[Qwi]?\\|",e:"\\|"},{b:/<<-\w+$/,e:/^\s*\w+$/}],relevance:0},l={cN:"string",v:[{b:"%q\\(",e:"\\)",c:s("\\(","\\)")},{b:"%q\\[",e:"\\]",c:s("\\[","\\]")},{b:"%q{",e:"}",c:s("{","}")},{b:"%q<",e:">",c:s("<",">")},{b:"%q\\|",e:"\\|"},{b:/<<-'\w+'$/,e:/^\s*\w+$/}],relevance:0},u={b:"(?!%})("+e.RSR+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",k:"case if select unless until when while",c:[{cN:"regexp",c:[e.BE,r],v:[{b:"//[a-z]*",relevance:0},{b:"/(?!\\/)",e:"/[a-z]*"}]}],relevance:0},_=[a,t,l,{cN:"regexp",c:[e.BE,r],v:[{b:"%r\\(",e:"\\)",c:s("\\(","\\)")},{b:"%r\\[",e:"\\]",c:s("\\[","\\]")},{b:"%r{",e:"}",c:s("{","}")},{b:"%r<",e:">",c:s("<",">")},{b:"%r\\|",e:"\\|"}],relevance:0},u,{cN:"meta",b:"@\\[",e:"\\]",c:[e.inherit(e.QSM,{cN:"meta-string"})]},e.HCM,{cN:"class",bK:"class module struct",e:"$|;",i:/=/,c:[e.HCM,e.inherit(e.TM,{b:b}),{b:"<"}]},{cN:"class",bK:"lib enum union",e:"$|;",i:/=/,c:[e.HCM,e.inherit(e.TM,{b:b})],relevance:10},{bK:"annotation",e:"$|;",i:/=/,c:[e.HCM,e.inherit(e.TM,{b:b})],relevance:10},{cN:"function",bK:"def",e:/\B\b/,c:[e.inherit(e.TM,{b:n,endsParent:!0})]},{cN:"function",bK:"fun macro",e:/\B\b/,c:[e.inherit(e.TM,{b:n,endsParent:!0})],relevance:5},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",relevance:0},{cN:"symbol",b:":",c:[t,{b:n}],relevance:0},{cN:"number",v:[{b:"\\b0b([01_]+)"+c},{b:"\\b0o([0-7_]+)"+c},{b:"\\b0x([A-Fa-f0-9_]+)"+c},{b:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_*[-+]?[0-9_]*)?(_*f(32|64))?(?!_)"},{b:"\\b([1-9][0-9_]*|0)"+c}],relevance:0}];return r.c=_,a.c=_.slice(1),{aliases:["cr"],l:"[a-zA-Z_]\\w*[!?=]?",k:i,c:_}});