var o,d;function M(){if(d)return o;d=1;function _(n){const i="(_?[ui](8|16|32|64|128))?",E="(_?f(32|64))?",u="[a-zA-Z_]\\w*[!?=]?",a="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",t="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",c={$pattern:u,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"},s={className:"subst",begin:/#\{/,end:/\}/,keywords:c},w={className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},b={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:c};function e(A,T){const l=[{begin:A,end:T}];return l[0].contains=l,l}const g={className:"string",contains:[n.BACKSLASH_ESCAPE,s],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:e("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:e("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:e(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:e("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},m={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:e("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:e("\\[","\\]")},{begin:"%q\\{",end:/\}/,contains:e(/\{/,/\}/)},{begin:"%q<",end:">",contains:e("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},N={begin:"(?!%\\})("+n.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[n.BACKSLASH_ESCAPE,s],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},f={className:"regexp",contains:[n.BACKSLASH_ESCAPE,s],variants:[{begin:"%r\\(",end:"\\)",contains:e("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:e("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:e(/\{/,/\}/)},{begin:"%r<",end:">",contains:e("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},v={className:"meta",begin:"@\\[",end:"\\]",contains:[n.inherit(n.QUOTE_STRING_MODE,{className:"string"})]},r=[b,g,m,f,N,v,w,n.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[n.HASH_COMMENT_MODE,n.inherit(n.TITLE_MODE,{begin:t}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[n.HASH_COMMENT_MODE,n.inherit(n.TITLE_MODE,{begin:t})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[n.HASH_COMMENT_MODE,n.inherit(n.TITLE_MODE,{begin:t})],relevance:2},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[n.inherit(n.TITLE_MODE,{begin:a,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[n.inherit(n.TITLE_MODE,{begin:a,endsParent:!0})],relevance:2},{className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[g,{begin:a}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?"+E+"(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+i}],relevance:0}];return s.contains=r,b.contains=r.slice(1),{name:"Crystal",aliases:["cr"],keywords:c,contains:r}}return o=_,o}export{M as r};
//# sourceMappingURL=crystal-CCP6jYrp.chunk.mjs.map
