mode-scheme-57d2bf78.js 4.1 KB

12
  1. import{g as y}from"./index-91b358e1.js";function _(g,p){for(var r=0;r<p.length;r++){const s=p[r];if(typeof s!="string"&&!Array.isArray(s)){for(const d in s)if(d!=="default"&&!(d in g)){const u=Object.getOwnPropertyDescriptor(s,d);u&&Object.defineProperty(g,d,u.get?u:{enumerable:!0,get:()=>s[d]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var b={exports:{}};(function(g,p){ace.define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(r,s,d){var u=r("../lib/oop"),f=r("./text_highlight_rules").TextHighlightRules,i=function(){var o="case|do|let|loop|if|else|when",l="eq?|eqv?|equal?|and|or|not|null?",e="#t|#f",t="cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load",n=this.createKeywordMapper({"keyword.control":o,"keyword.operator":l,"constant.language":e,"support.function":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.scheme","text","entity.name.function.scheme"],regex:"(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:"punctuation.definition.constant.character.scheme",regex:"#:\\S+"},{token:["punctuation.definition.variable.scheme","variable.other.global.scheme","punctuation.definition.variable.scheme"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"#[xXoObB][0-9a-fA-F]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"},{token:n,regex:"[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.scheme",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}]}};u.inherits(i,f),s.SchemeHighlightRules=i}),ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(r,s,d){var u=r("../range").Range,f=function(){};(function(){this.checkOutdent=function(i,o){return/^\s+$/.test(i)?/^\s*\)/.test(o):!1},this.autoOutdent=function(i,o){var l=i.getLine(o),e=l.match(/^(\s*\))/);if(!e)return 0;var t=e[1].length,n=i.findMatchingBracket({row:o,column:t});if(!n||n.row==o)return 0;var h=this.$getIndent(i.getLine(n.row));i.replace(new u(o,0,o,t-1),h)},this.$getIndent=function(i){var o=i.match(/^(\s+)/);return o?o[1]:""}}).call(f.prototype),s.MatchingParensOutdent=f}),ace.define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules","ace/mode/matching_parens_outdent"],function(r,s,d){var u=r("../lib/oop"),f=r("./text").Mode,i=r("./scheme_highlight_rules").SchemeHighlightRules,o=r("./matching_parens_outdent").MatchingParensOutdent,l=function(){this.HighlightRules=i,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};u.inherits(l,f),function(){this.lineCommentStart=";",this.minorIndentFunctions=["define","lambda","define-macro","define-syntax","syntax-rules","define-record-type","define-structure"],this.$toIndent=function(e){return e.split("").map(function(t){return/\s/.exec(t)?t:" "}).join("")},this.$calculateIndent=function(e,t){for(var n=this.$getIndent(e),h=0,m,a,c=e.length-1;c>=0&&(a=e[c],a==="("?(h--,m=!0):a==="("||a==="["||a==="{"?(h--,m=!1):(a===")"||a==="]"||a==="}")&&h++,!(h<0));c--);if(h<0&&m){c+=1;for(var x=c,v="";;){if(a=e[c],a===" "||a===" ")return this.minorIndentFunctions.indexOf(v)!==-1?this.$toIndent(e.substring(0,x-1)+t):this.$toIndent(e.substring(0,c+1));if(a===void 0)return this.$toIndent(e.substring(0,x-1)+t);v+=e[c],c++}}else return h<0&&!m?this.$toIndent(e.substring(0,c+1)):(h>0&&(n=n.substring(0,n.length-t.length)),n)},this.getNextLineIndent=function(e,t,n){return this.$calculateIndent(t,n)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/scheme"}.call(l.prototype),s.Mode=l}),function(){ace.require(["ace/mode/scheme"],function(r){g&&(g.exports=r)})}()})(b);var k=b.exports;const $=y(k),I=_({__proto__:null,default:$},[k]);export{I as m};
  2. //# sourceMappingURL=mode-scheme-57d2bf78.js.map