1 |
- {"version":3,"file":"mode-scheme-57d2bf78.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-scheme.js"],"sourcesContent":["ace.define(\"ace/mode/scheme_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar SchemeHighlightRules = function () {\n var keywordControl = \"case|do|let|loop|if|else|when\";\n var keywordOperator = \"eq?|eqv?|equal?|and|or|not|null?\";\n var constantLanguage = \"#t|#f\";\n var supportFunctions = \"cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load\";\n var keywordMapper = this.createKeywordMapper({\n \"keyword.control\": keywordControl,\n \"keyword.operator\": keywordOperator,\n \"constant.language\": constantLanguage,\n \"support.function\": supportFunctions\n }, \"identifier\", true);\n this.$rules =\n {\n \"start\": [\n {\n token: \"comment\",\n regex: \";.*$\"\n },\n {\n \"token\": [\"storage.type.function-type.scheme\", \"text\", \"entity.name.function.scheme\"],\n \"regex\": \"(?:\\\\b(?:(define|define-syntax|define-macro))\\\\b)(\\\\s+)((?:\\\\w|\\\\-|\\\\!|\\\\?)*)\"\n },\n {\n \"token\": \"punctuation.definition.constant.character.scheme\",\n \"regex\": \"#:\\\\S+\"\n },\n {\n \"token\": [\"punctuation.definition.variable.scheme\", \"variable.other.global.scheme\", \"punctuation.definition.variable.scheme\"],\n \"regex\": \"(\\\\*)(\\\\S*)(\\\\*)\"\n },\n {\n \"token\": \"constant.numeric\",\n \"regex\": \"#[xXoObB][0-9a-fA-F]+\"\n },\n {\n \"token\": \"constant.numeric\",\n \"regex\": \"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\"\n },\n {\n \"token\": keywordMapper,\n \"regex\": \"[a-zA-Z_#][a-zA-Z0-9_\\\\-\\\\?\\\\!\\\\*]*\"\n },\n {\n \"token\": \"string\",\n \"regex\": '\"(?=.)',\n \"next\": \"qqstring\"\n }\n ],\n \"qqstring\": [\n {\n \"token\": \"constant.character.escape.scheme\",\n \"regex\": \"\\\\\\\\.\"\n },\n {\n \"token\": \"string\",\n \"regex\": '[^\"\\\\\\\\]+',\n \"merge\": true\n }, {\n \"token\": \"string\",\n \"regex\": \"\\\\\\\\$\",\n \"next\": \"qqstring\",\n \"merge\": true\n }, {\n \"token\": \"string\",\n \"regex\": '\"|$',\n \"next\": \"start\",\n \"merge\": true\n }\n ]\n };\n};\noop.inherits(SchemeHighlightRules, TextHighlightRules);\nexports.SchemeHighlightRules = SchemeHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_parens_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar MatchingParensOutdent = function () { };\n(function () {\n this.checkOutdent = function (line, input) {\n if (!/^\\s+$/.test(line))\n return false;\n return /^\\s*\\)/.test(input);\n };\n this.autoOutdent = function (doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\))/);\n if (!match)\n return 0;\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({ row: row, column: column });\n if (!openBracePos || openBracePos.row == row)\n return 0;\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column - 1), indent);\n };\n this.$getIndent = function (line) {\n var match = line.match(/^(\\s+)/);\n if (match) {\n return match[1];\n }\n return \"\";\n };\n}).call(MatchingParensOutdent.prototype);\nexports.MatchingParensOutdent = MatchingParensOutdent;\n\n});\n\nace.define(\"ace/mode/scheme\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/scheme_highlight_rules\",\"ace/mode/matching_parens_outdent\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar SchemeHighlightRules = require(\"./scheme_highlight_rules\").SchemeHighlightRules;\nvar MatchingParensOutdent = require(\"./matching_parens_outdent\").MatchingParensOutdent;\nvar Mode = function () {\n this.HighlightRules = SchemeHighlightRules;\n this.$outdent = new MatchingParensOutdent();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \";\";\n this.minorIndentFunctions = [\"define\", \"lambda\", \"define-macro\", \"define-syntax\", \"syntax-rules\", \"define-record-type\", \"define-structure\"];\n this.$toIndent = function (str) {\n return str.split('').map(function (ch) {\n if (/\\s/.exec(ch)) {\n return ch;\n }\n else {\n return ' ';\n }\n }).join('');\n };\n this.$calculateIndent = function (line, tab) {\n var baseIndent = this.$getIndent(line);\n var delta = 0;\n var isParen, ch;\n for (var i = line.length - 1; i >= 0; i--) {\n ch = line[i];\n if (ch === '(') {\n delta--;\n isParen = true;\n }\n else if (ch === '(' || ch === '[' || ch === '{') {\n delta--;\n isParen = false;\n }\n else if (ch === ')' || ch === ']' || ch === '}') {\n delta++;\n }\n if (delta < 0) {\n break;\n }\n }\n if (delta < 0 && isParen) {\n i += 1;\n var iBefore = i;\n var fn = '';\n while (true) {\n ch = line[i];\n if (ch === ' ' || ch === '\\t') {\n if (this.minorIndentFunctions.indexOf(fn) !== -1) {\n return this.$toIndent(line.substring(0, iBefore - 1) + tab);\n }\n else {\n return this.$toIndent(line.substring(0, i + 1));\n }\n }\n else if (ch === undefined) {\n return this.$toIndent(line.substring(0, iBefore - 1) + tab);\n }\n fn += line[i];\n i++;\n }\n }\n else if (delta < 0 && !isParen) {\n return this.$toIndent(line.substring(0, i + 1));\n }\n else if (delta > 0) {\n baseIndent = baseIndent.substring(0, baseIndent.length - tab.length);\n return baseIndent;\n }\n else {\n return baseIndent;\n }\n };\n this.getNextLineIndent = function (state, line, tab) {\n return this.$calculateIndent(line, tab);\n };\n this.checkOutdent = function (state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n this.autoOutdent = function (state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n this.$id = \"ace/mode/scheme\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/scheme\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","oop","TextHighlightRules","SchemeHighlightRules","keywordControl","keywordOperator","constantLanguage","supportFunctions","keywordMapper","Range","MatchingParensOutdent","line","input","doc","row","match","column","openBracePos","indent","TextMode","Mode","str","ch","tab","baseIndent","delta","isParen","i","iBefore","fn","state","m"],"mappings":"gaAAA,IAAI,OAAO,kCAAkC,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CAC7J,IAAIC,EAAMH,EAAQ,YAAY,EAC1BI,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDK,EAAuB,UAAY,CACnC,IAAIC,EAAiB,gCACjBC,EAAkB,mCAClBC,EAAmB,QACnBC,EAAmB,sGACnBC,EAAgB,KAAK,oBAAoB,CACzC,kBAAmBJ,EACnB,mBAAoBC,EACpB,oBAAqBC,EACrB,mBAAoBC,CAC5B,EAAO,aAAc,EAAI,EACrB,KAAK,OACD,CACI,MAAS,CACL,CACI,MAAO,UACP,MAAO,MACV,EACD,CACI,MAAS,CAAC,oCAAqC,OAAQ,6BAA6B,EACpF,MAAS,+EACZ,EACD,CACI,MAAS,mDACT,MAAS,QACZ,EACD,CACI,MAAS,CAAC,yCAA0C,+BAAgC,wCAAwC,EAC5H,MAAS,kBACZ,EACD,CACI,MAAS,mBACT,MAAS,uBACZ,EACD,CACI,MAAS,mBACT,MAAS,8CACZ,EACD,CACI,MAASC,EACT,MAAS,qCACZ,EACD,CACI,MAAS,SACT,MAAS,SACT,KAAQ,UACX,CACJ,EACD,SAAY,CACR,CACI,MAAS,mCACT,MAAS,OACZ,EACD,CACI,MAAS,SACT,MAAS,YACT,MAAS,EAC7B,EAAmB,CACC,MAAS,SACT,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