mode-coffee-3a4b2494.js 7.8 KB

1
  1. import{g as w}from"./index-15e3682d.js";function A(m,y){for(var o=0;o<y.length;o++){const l=y[o];if(typeof l!="string"&&!Array.isArray(l)){for(const d in l)if(d!=="default"&&!(d in m)){const u=Object.getOwnPropertyDescriptor(l,d);u&&Object.defineProperty(m,d,u.get?u:{enumerable:!0,get:()=>l[d]})}}}return Object.freeze(Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}))}var b={exports:{}};(function(m,y){ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(o,l,d){var u=o("../lib/oop"),p=o("./text_highlight_rules").TextHighlightRules;u.inherits(i,p);function i(){var a="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",r="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes|yield|export|import|default",h="true|false|null|undefined|NaN|Infinity",e="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",f="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",t="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",n="window|arguments|prototype|document",g=this.createKeywordMapper({keyword:r,"constant.language":h,"invalid.illegal":e,"language.support.class":f,"language.support.function":t,"variable.language":n},"identifier"),s={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},c=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(v,k,x){return this.next="",v=="{"&&x.length?(x.unshift("start",k),"paren"):v=="}"&&x.length&&(x.shift(),this.next=x.shift()||"",this.next.indexOf("string")!=-1)?"paren.string":"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+e+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+a+")(?:(\\s+)(extends)(\\s+)("+a+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(s.token),regex:"("+a+")(\\s*)([=:])(\\s*)"+s.regex},s,{token:"variable",regex:"@(?:"+a+")?"},{token:g,regex:a},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}l.CoffeeHighlightRules=i}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(o,l,d){var u=o("../range").Range,p=function(){};(function(){this.checkOutdent=function(i,a){return/^\s+$/.test(i)?/^\s*\}/.test(a):!1},this.autoOutdent=function(i,a){var r=i.getLine(a),h=r.match(/^(\s*\})/);if(!h)return 0;var e=h[1].length,f=i.findMatchingBracket({row:a,column:e});if(!f||f.row==a)return 0;var t=this.$getIndent(i.getLine(f.row));i.replace(new u(a,0,a,e-1),t)},this.$getIndent=function(i){return i.match(/^\s*/)[0]}}).call(p.prototype),l.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(o,l,d){var u=o("../../lib/oop"),p=o("./fold_mode").FoldMode,i=o("../../range").Range,a=l.FoldMode=function(){};u.inherits(a,p),function(){this.getFoldWidgetRange=function(r,h,e){var f=this.indentationBlock(r,e);if(f)return f;var t=/\S/,n=r.getLine(e),g=n.search(t);if(!(g==-1||n[g]!="#")){for(var s=n.length,c=r.getLength(),v=e,k=e;++e<c;){n=r.getLine(e);var x=n.search(t);if(x!=-1){if(n[x]!="#")break;k=e}}if(k>v){var _=r.getLine(k).length;return new i(v,s,k,_)}}},this.getFoldWidget=function(r,h,e){var f=r.getLine(e),t=f.search(/\S/),n=r.getLine(e+1),g=r.getLine(e-1),s=g.search(/\S/),c=n.search(/\S/);if(t==-1)return r.foldWidgets[e-1]=s!=-1&&s<c?"start":"","";if(s==-1){if(t==c&&f[t]=="#"&&n[t]=="#")return r.foldWidgets[e-1]="",r.foldWidgets[e+1]="","start"}else if(s==t&&f[t]=="#"&&g[t]=="#"&&r.getLine(e-2).search(/\S/)==-1)return r.foldWidgets[e-1]="start",r.foldWidgets[e+1]="","";return s!=-1&&s<t?r.foldWidgets[e-1]="start":r.foldWidgets[e-1]="",t<c?"start":""}}.call(a.prototype)}),ace.define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"],function(o,l,d){var u=o("./coffee_highlight_rules").CoffeeHighlightRules,p=o("./matching_brace_outdent").MatchingBraceOutdent,i=o("./folding/coffee").FoldMode;o("../range").Range;var a=o("./text").Mode,r=o("../worker/worker_client").WorkerClient,h=o("../lib/oop");function e(){this.HighlightRules=u,this.$outdent=new p,this.foldingRules=new i}h.inherits(e,a),function(){var f=/(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/;this.lineCommentStart="#",this.blockComment={start:"###",end:"###"},this.getNextLineIndent=function(t,n,g){var s=this.$getIndent(n),c=this.getTokenizer().getLineTokens(n,t).tokens;return!(c.length&&c[c.length-1].type==="comment")&&t==="start"&&f.test(n)&&(s+=g),s},this.checkOutdent=function(t,n,g){return this.$outdent.checkOutdent(n,g)},this.autoOutdent=function(t,n,g){this.$outdent.autoOutdent(n,g)},this.createWorker=function(t){var n=new r(["ace"],"ace/mode/coffee_worker","Worker");return n.attachToDocument(t.getDocument()),n.on("annotate",function(g){t.setAnnotations(g.data)}),n.on("terminate",function(){t.clearAnnotations()}),n},this.$id="ace/mode/coffee",this.snippetFileId="ace/snippets/coffee"}.call(e.prototype),l.Mode=e}),function(){ace.require(["ace/mode/coffee"],function(o){m&&(m.exports=o)})}()})(b);var R=b.exports;const F=w(R),M=A({__proto__:null,default:F},[R]);export{M as m};