{"version":3,"file":"mode-haskell_cabal-68aad147.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-haskell_cabal.js"],"sourcesContent":["ace.define(\"ace/mode/haskell_cabal_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){/**\n * Haskell Cabal files highlighter (https://www.haskell.org/cabal/users-guide/developing-packages.html)\n **/\n\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar CabalHighlightRules = function () {\n this.$rules = {\n \"start\": [\n {\n token: \"comment\",\n regex: \"^\\\\s*--.*$\"\n }, {\n token: [\"keyword\"],\n regex: /^(\\s*\\w.*?)(:(?:\\s+|$))/\n }, {\n token: \"constant.numeric\",\n regex: /[\\d_]+(?:(?:[\\.\\d_]*)?)/\n }, {\n token: \"constant.language.boolean\",\n regex: \"(?:true|false|TRUE|FALSE|True|False|yes|no)\\\\b\"\n }, {\n token: \"markup.heading\",\n regex: /^(\\w.*)$/\n }\n ]\n };\n};\noop.inherits(CabalHighlightRules, TextHighlightRules);\nexports.CabalHighlightRules = CabalHighlightRules;\n\n});\n\nace.define(\"ace/mode/folding/haskell_cabal\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/fold_mode\",\"ace/range\"], function(require, exports, module){/*\n* Folding mode for Cabal files (Haskell): allow folding each seaction, including\n* the initial general section.\n*/\n\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar BaseFoldMode = require(\"./fold_mode\").FoldMode;\nvar Range = require(\"../../range\").Range;\nvar FoldMode = exports.FoldMode = function () { };\noop.inherits(FoldMode, BaseFoldMode);\n(function () {\n this.isHeading = function (session, row) {\n var heading = \"markup.heading\";\n var token = session.getTokens(row)[0];\n return row == 0 || (token && token.type.lastIndexOf(heading, 0) === 0);\n };\n this.getFoldWidget = function (session, foldStyle, row) {\n if (this.isHeading(session, row)) {\n return \"start\";\n }\n else if (foldStyle === \"markbeginend\" && !(/^\\s*$/.test(session.getLine(row)))) {\n var maxRow = session.getLength();\n while (++row < maxRow) {\n if (!(/^\\s*$/.test(session.getLine(row)))) {\n break;\n }\n }\n if (row == maxRow || this.isHeading(session, row)) {\n return \"end\";\n }\n }\n return \"\";\n };\n this.getFoldWidgetRange = function (session, foldStyle, row) {\n var line = session.getLine(row);\n var startColumn = line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n if (this.isHeading(session, row)) {\n while (++row < maxRow) {\n if (this.isHeading(session, row)) {\n row--;\n break;\n }\n }\n endRow = row;\n if (endRow > startRow) {\n while (endRow > startRow && /^\\s*$/.test(session.getLine(endRow)))\n endRow--;\n }\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n }\n else if (this.getFoldWidget(session, foldStyle, row) === \"end\") {\n var endRow = row;\n var endColumn = session.getLine(endRow).length;\n while (--row >= 0) {\n if (this.isHeading(session, row)) {\n break;\n }\n }\n var line = session.getLine(row);\n var startColumn = line.length;\n return new Range(row, startColumn, endRow, endColumn);\n }\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/haskell_cabal\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/haskell_cabal_highlight_rules\",\"ace/mode/folding/haskell_cabal\"], function(require, exports, module){/**\n* Haskell Cabal files mode (https://www.haskell.org/cabal/users-guide/developing-packages.html)\n**/\n\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar CabalHighlightRules = require(\"./haskell_cabal_highlight_rules\").CabalHighlightRules;\nvar FoldMode = require(\"./folding/haskell_cabal\").FoldMode;\nvar Mode = function () {\n this.HighlightRules = CabalHighlightRules;\n this.foldingRules = new FoldMode();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \"--\";\n this.blockComment = null;\n this.$id = \"ace/mode/haskell_cabal\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/haskell_cabal\"], 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","CabalHighlightRules","BaseFoldMode","Range","FoldMode","session","row","heading","token","foldStyle","maxRow","line","startColumn","startRow","endRow","endColumn","TextMode","Mode","m"],"mappings":"gaAAA,IAAI,OAAO,yCAAyC,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CAIpK,IAAIC,EAAMH,EAAQ,YAAY,EAC1BI,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDK,EAAsB,UAAY,CAClC,KAAK,OAAS,CACV,MAAS,CACL,CACI,MAAO,UACP,MAAO,YACvB,EAAe,CACC,MAAO,CAAC,SAAS,EACjB,MAAO,yBACvB,EAAe,CACC,MAAO,mBACP,MAAO,yBACvB,EAAe,CACC,MAAO,4BACP,MAAO,gDACvB,EAAe,CACC,MAAO,iBACP,MAAO,UACV,CACJ,CACT,CACA,EACAF,EAAI,SAASE,EAAqBD,CAAkB,EACpDH,EAAQ,oBAAsBI,CAE9B,CAAC,EAED,IAAI,OAAO,iCAAiC,CAAC,UAAU,UAAU,SAAS,cAAc,6BAA6B,WAAW,EAAG,SAASL,EAASC,EAASC,EAAO,CAKrK,IAAIC,EAAMH,EAAQ,eAAe,EAC7BM,EAAeN,EAAQ,aAAa,EAAE,SACtCO,EAAQP,EAAQ,aAAa,EAAE,MAC/BQ,EAAWP,EAAQ,SAAW,UAAY,CAAA,EAC9CE,EAAI,SAASK,EAAUF,CAAY,EAClC,UAAY,CACT,KAAK,UAAY,SAAUG,EAASC,EAAK,CACrC,IAAIC,EAAU,iBACVC,EAAQH,EAAQ,UAAUC,CAAG,EAAE,CAAC,EACpC,OAAOA,GAAO,GAAME,GAASA,EAAM,KAAK,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