mode-elm-d9f9f37a.js.map 16 KB

1
  1. {"version":3,"file":"mode-elm-d9f9f37a.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-elm.js"],"sourcesContent":["ace.define(\"ace/mode/elm_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){// TODO check with https://github.com/deadfoxygrandpa/Elm.tmLanguage\n\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar ElmHighlightRules = function () {\n var keywordMapper = this.createKeywordMapper({\n \"keyword\": \"as|case|class|data|default|deriving|do|else|export|foreign|\" +\n \"hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|\" +\n \"module|newtype|of|open|then|type|where|_|port|\\u03BB\"\n }, \"identifier\");\n var escapeRe = /\\\\(\\d+|['\"\\\\&trnbvf])/;\n var smallRe = /[a-z_]/.source;\n var largeRe = /[A-Z]/.source;\n var idRe = /[a-z_A-Z0-9']/.source;\n this.$rules = {\n start: [{\n token: \"string.start\",\n regex: '\"',\n next: \"string\"\n }, {\n token: \"string.character\",\n regex: \"'(?:\" + escapeRe.source + \"|.)'?\"\n }, {\n regex: /0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\\d+(\\.\\d+)?([eE][-+]?\\d*)?/,\n token: \"constant.numeric\"\n }, {\n token: \"comment\",\n regex: \"--.*\"\n }, {\n token: \"keyword\",\n regex: /\\.\\.|\\||:|=|\\\\|\"|->|<-|\\u2192/\n }, {\n token: \"keyword.operator\",\n regex: /[-!#$%&*+.\\/<=>?@\\\\^|~:\\u03BB\\u2192]+/\n }, {\n token: \"operator.punctuation\",\n regex: /[,;`]/\n }, {\n regex: largeRe + idRe + \"+\\\\.?\",\n token: function (value) {\n if (value[value.length - 1] == \".\")\n return \"entity.name.function\";\n return \"constant.language\";\n }\n }, {\n regex: \"^\" + smallRe + idRe + \"+\",\n token: function (value) {\n return \"constant.language\";\n }\n }, {\n token: keywordMapper,\n regex: \"[\\\\w\\\\xff-\\\\u218e\\\\u2455-\\\\uffff]+\\\\b\"\n }, {\n regex: \"{-#?\",\n token: \"comment.start\",\n onMatch: function (value, currentState, stack) {\n this.next = value.length == 2 ? \"blockComment\" : \"docComment\";\n return this.token;\n }\n }, {\n token: \"variable.language\",\n regex: /\\[markdown\\|/,\n next: \"markdown\"\n }, {\n token: \"paren.lparen\",\n regex: /[\\[({]/\n }, {\n token: \"paren.rparen\",\n regex: /[\\])}]/\n }],\n markdown: [{\n regex: /\\|\\]/,\n next: \"start\"\n }, {\n defaultToken: \"string\"\n }],\n blockComment: [{\n regex: \"{-\",\n token: \"comment.start\",\n push: \"blockComment\"\n }, {\n regex: \"-}\",\n token: \"comment.end\",\n next: \"pop\"\n }, {\n defaultToken: \"comment\"\n }],\n docComment: [{\n regex: \"{-\",\n token: \"comment.start\",\n push: \"docComment\"\n }, {\n regex: \"-}\",\n token: \"comment.end\",\n next: \"pop\"\n }, {\n defaultToken: \"doc.comment\"\n }],\n string: [{\n token: \"constant.language.escape\",\n regex: escapeRe\n }, {\n token: \"text\",\n regex: /\\\\(\\s|$)/,\n next: \"stringGap\"\n }, {\n token: \"string.end\",\n regex: '\"',\n next: \"start\"\n }, {\n defaultToken: \"string\"\n }],\n stringGap: [{\n token: \"text\",\n regex: /\\\\/,\n next: \"string\"\n }, {\n token: \"error\",\n regex: \"\",\n next: \"start\"\n }]\n };\n this.normalizeRules();\n};\noop.inherits(ElmHighlightRules, TextHighlightRules);\nexports.ElmHighlightRules = ElmHighlightRules;\n\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar Range = require(\"../../range\").Range;\nvar BaseFoldMode = require(\"./fold_mode\").FoldMode;\nvar FoldMode = exports.FoldMode = function (commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start));\n this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end));\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n(function () {\n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe = /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function (session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n return fw;\n };\n this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n }\n else if (foldStyle != \"all\")\n range = null;\n }\n return range;\n }\n if (foldStyle === \"markbegin\")\n return;\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n this.getSectionRange = function (session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n }\n else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n }\n else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function (session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m)\n continue;\n if (m[1])\n depth--;\n else\n depth++;\n if (!depth)\n break;\n }\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/elm\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/elm_highlight_rules\",\"ace/mode/folding/cstyle\"], function(require, exports, module){/*\n THIS FILE WAS AUTOGENERATED BY mode.tmpl.js\n*/\n\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar HighlightRules = require(\"./elm_highlight_rules\").ElmHighlightRules;\nvar FoldMode = require(\"./folding/cstyle\").FoldMode;\nvar Mode = function () {\n this.HighlightRules = HighlightRules;\n this.foldingRules = new FoldMode();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \"--\";\n this.blockComment = { start: \"{-\", end: \"-}\", nestable: true };\n this.$id = \"ace/mode/elm\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/elm\"], 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","ElmHighlightRules","keywordMapper","escapeRe","smallRe","largeRe","idRe","value","currentState","stack","Range","BaseFoldMode","FoldMode","commentRegex","session","foldStyle","row","line","fw","forceMultiline","match","i","range","startIndent","startRow","startColumn","endRow","maxRow","indent","subRange","re","depth","m","TextMode","HighlightRules","Mode"],"mappings":"gaAAA,IAAI,OAAO,+BAA+B,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CAE1J,IAAIC,EAAMH,EAAQ,YAAY,EAC1BI,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDK,EAAoB,UAAY,CAChC,IAAIC,EAAgB,KAAK,oBAAoB,CACzC,QAAW,yKAGd,EAAE,YAAY,EACXC,EAAW,wBACXC,EAAU,SAAS,OACnBC,EAAU,QAAQ,OAClBC,EAAO,gBAAgB,OAC3B,KAAK,OAAS,CACV,MAAO,CAAC,CACA,MAAO,eACP,MAAO,IACP,KAAM,QACtB,EAAe,CACC,MAAO,mBACP,MAAO,OAASH,EAAS,OAAS,OAClD,EAAe,CACC,MAAO,8DACP,MAAO,kBACvB,EAAe,CACC,MAAO,UACP,MAAO,MACvB,EAAe,CACC,MAAO,UACP,MAAO,+BACvB,EAAe,CACC,MAAO,mBACP,MAAO,uCACvB,EAAe,CACC,MAAO,uBACP,MAAO,OACvB,EAAe,CACC,MAAOE,EAAUC,EAAO,QACxB,MAAO,SAAUC,EAAO,CACpB,OAAIA,EAAMA,EAAM,OAAS,CAAC,GAAK,IACpB,uBACJ,mBACV,CACjB,EAAe,CACC,MAAO,IAAMH,EAAUE,EAAO,IAC9B,MAAO,SAAUC,EAAO,CACpB,MAAO,mBACV,CACjB,EAAe,CACC,MAAO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