mode-haxe-0c68326a.js 6.8 KB

1
  1. import{g as _}from"./index-b2e76ed2.js";function b(x,v){for(var i=0;i<v.length;i++){const c=v[i];if(typeof c!="string"&&!Array.isArray(c)){for(const m in c)if(m!=="default"&&!(m in x)){const h=Object.getOwnPropertyDescriptor(c,m);h&&Object.defineProperty(x,m,h.get?h:{enumerable:!0,get:()=>c[m]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var k={exports:{}};(function(x,v){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(i,c,m){var h=i("../lib/oop"),u=i("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},r.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};h.inherits(r,u),r.getTagRule=function(l){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},r.getStartRule=function(l){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:l}},r.getEndRule=function(l){return{token:"comment.doc",regex:"\\*\\/",next:l}},c.DocCommentHighlightRules=r}),ace.define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(i,c,m){var h=i("../lib/oop"),u=i("./doc_comment_highlight_rules").DocCommentHighlightRules,r=i("./text_highlight_rules").TextHighlightRules,l=function(){var t="break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std",n="null|true|false",e=this.createKeywordMapper({"variable.language":"this",keyword:t,"constant.language":n},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},u.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({<]"},{token:"paren.rparen",regex:"[\\])}>]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(u,"doc-",[u.getEndRule("start")])};h.inherits(l,r),c.HaxeHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(i,c,m){var h=i("../range").Range,u=function(){};(function(){this.checkOutdent=function(r,l){return/^\s+$/.test(r)?/^\s*\}/.test(l):!1},this.autoOutdent=function(r,l){var t=r.getLine(l),n=t.match(/^(\s*\})/);if(!n)return 0;var e=n[1].length,o=r.findMatchingBracket({row:l,column:e});if(!o||o.row==l)return 0;var g=this.$getIndent(r.getLine(o.row));r.replace(new h(l,0,l,e-1),g)},this.$getIndent=function(r){return r.match(/^\s*/)[0]}}).call(u.prototype),c.MatchingBraceOutdent=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(i,c,m){var h=i("../../lib/oop"),u=i("../../range").Range,r=i("./fold_mode").FoldMode,l=c.FoldMode=function(t){t&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+t.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+t.end)))};h.inherits(l,r),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(t,n,e){var o=t.getLine(e);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var g=this._getFoldWidgetBase(t,n,e);return!g&&this.startRegionRe.test(o)?"start":g},this.getFoldWidgetRange=function(t,n,e,o){var g=t.getLine(e);if(this.startRegionRe.test(g))return this.getCommentRegionBlock(t,g,e);var a=g.match(this.foldingStartMarker);if(a){var s=a.index;if(a[1])return this.openingBracketBlock(t,a[1],e,s);var d=t.getCommentFoldRange(e,s+a[0].length,1);return d&&!d.isMultiLine()&&(o?d=this.getSectionRange(t,e):n!="all"&&(d=null)),d}if(n!=="markbegin"){var a=g.match(this.foldingStopMarker);if(a){var s=a.index+a[0].length;return a[1]?this.closingBracketBlock(t,a[1],e,s):t.getCommentFoldRange(e,s,-1)}}},this.getSectionRange=function(t,n){var e=t.getLine(n),o=e.search(/\S/),g=n,s=e.length;n=n+1;for(var d=n,a=t.getLength();++n<a;){e=t.getLine(n);var f=e.search(/\S/);if(f!==-1){if(o>f)break;var p=this.getFoldWidgetRange(t,"all",n);if(p){if(p.start.row<=g)break;if(p.isMultiLine())n=p.end.row;else if(o==f)break}d=n}}return new u(g,s,d,t.getLine(d).length)},this.getCommentRegionBlock=function(t,n,e){for(var o=n.search(/\s*$/),g=t.getLength(),s=e,d=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;++e<g;){n=t.getLine(e);var f=d.exec(n);if(f&&(f[1]?a--:a++,!a))break}var p=e;if(p>s)return new u(s,o,p,n.length)}}.call(l.prototype)}),ace.define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(i,c,m){var h=i("../lib/oop"),u=i("./text").Mode,r=i("./haxe_highlight_rules").HaxeHighlightRules,l=i("./matching_brace_outdent").MatchingBraceOutdent,t=i("./folding/cstyle").FoldMode,n=function(){this.HighlightRules=r,this.$outdent=new l,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new t};h.inherits(n,u),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,o,g){var s=this.$getIndent(o),d=this.getTokenizer().getLineTokens(o,e),a=d.tokens;if(a.length&&a[a.length-1].type=="comment")return s;if(e=="start"){var f=o.match(/^.*[\{\(\[]\s*$/);f&&(s+=g)}return s},this.checkOutdent=function(e,o,g){return this.$outdent.checkOutdent(o,g)},this.autoOutdent=function(e,o,g){this.$outdent.autoOutdent(o,g)},this.$id="ace/mode/haxe"}.call(n.prototype),c.Mode=n}),function(){ace.require(["ace/mode/haxe"],function(i){x&&(x.exports=i)})}()})(k);var R=k.exports;const M=_(R),$=b({__proto__:null,default:M},[R]);export{$ as m};