1 |
- {"version":3,"file":"mode-snippets-fccf796c.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-snippets.js"],"sourcesContent":["ace.define(\"ace/mode/folding/coffee\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/fold_mode\",\"ace/range\"], function(require, exports, module){\"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.getFoldWidgetRange = function (session, foldStyle, row) {\n var range = this.indentationBlock(session, row);\n if (range)\n return range;\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1 || line[startLevel] != \"#\")\n return;\n var startColumn = line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n while (++row < maxRow) {\n line = session.getLine(row);\n var level = line.search(re);\n if (level == -1)\n continue;\n if (line[level] != \"#\")\n break;\n endRow = row;\n }\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n this.getFoldWidget = function (session, foldStyle, row) {\n var line = session.getLine(row);\n var indent = line.search(/\\S/);\n var next = session.getLine(row + 1);\n var prev = session.getLine(row - 1);\n var prevIndent = prev.search(/\\S/);\n var nextIndent = next.search(/\\S/);\n if (indent == -1) {\n session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? \"start\" : \"\";\n return \"\";\n }\n if (prevIndent == -1) {\n if (indent == nextIndent && line[indent] == \"#\" && next[indent] == \"#\") {\n session.foldWidgets[row - 1] = \"\";\n session.foldWidgets[row + 1] = \"\";\n return \"start\";\n }\n }\n else if (prevIndent == indent && line[indent] == \"#\" && prev[indent] == \"#\") {\n if (session.getLine(row - 2).search(/\\S/) == -1) {\n session.foldWidgets[row - 1] = \"start\";\n session.foldWidgets[row + 1] = \"\";\n return \"\";\n }\n }\n if (prevIndent != -1 && prevIndent < indent)\n session.foldWidgets[row - 1] = \"start\";\n else\n session.foldWidgets[row - 1] = \"\";\n if (indent < nextIndent)\n return \"start\";\n else\n return \"\";\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/snippets\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/text_highlight_rules\",\"ace/mode/folding/coffee\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar SnippetHighlightRules = function () {\n var builtins = \"SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|\" +\n \"LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME\";\n this.$rules = {\n \"start\": [\n { token: \"constant.language.escape\", regex: /\\\\[\\$}`\\\\]/ },\n { token: \"keyword\", regex: \"\\\\$(?:TM_)?(?:\" + builtins + \")\\\\b\" },\n { token: \"variable\", regex: \"\\\\$\\\\w+\" },\n { onMatch: function (value, state, stack) {\n if (stack[1])\n stack[1]++;\n else\n stack.unshift(state, 1);\n return this.tokenName;\n }, tokenName: \"markup.list\", regex: \"\\\\${\", next: \"varDecl\" },\n { onMatch: function (value, state, stack) {\n if (!stack[1])\n return \"text\";\n stack[1]--;\n if (!stack[1])\n stack.splice(0, 2);\n return this.tokenName;\n }, tokenName: \"markup.list\", regex: \"}\" },\n { token: \"doc.comment\", regex: /^\\${2}-{5,}$/ }\n ],\n \"varDecl\": [\n { regex: /\\d+\\b/, token: \"constant.numeric\" },\n { token: \"keyword\", regex: \"(?:TM_)?(?:\" + builtins + \")\\\\b\" },\n { token: \"variable\", regex: \"\\\\w+\" },\n { regex: /:/, token: \"punctuation.operator\", next: \"start\" },\n { regex: /\\//, token: \"string.regex\", next: \"regexp\" },\n { regex: \"\", next: \"start\" }\n ],\n \"regexp\": [\n { regex: /\\\\./, token: \"escape\" },\n { regex: /\\[/, token: \"regex.start\", next: \"charClass\" },\n { regex: \"/\", token: \"string.regex\", next: \"format\" },\n { \"token\": \"string.regex\", regex: \".\" }\n ],\n charClass: [\n { regex: \"\\\\.\", token: \"escape\" },\n { regex: \"\\\\]\", token: \"regex.end\", next: \"regexp\" },\n { \"token\": \"string.regex\", regex: \".\" }\n ],\n \"format\": [\n { regex: /\\\\[ulULE]/, token: \"keyword\" },\n { regex: /\\$\\d+/, token: \"variable\" },\n { regex: \"/[gim]*:?\", token: \"string.regex\", next: \"start\" },\n { \"token\": \"string\", regex: \".\" }\n ]\n };\n};\noop.inherits(SnippetHighlightRules, TextHighlightRules);\nexports.SnippetHighlightRules = SnippetHighlightRules;\nvar SnippetGroupHighlightRules = function () {\n this.$rules = {\n \"start\": [\n { token: \"text\", regex: \"^\\\\t\", next: \"sn-start\" },\n { token: \"invalid\", regex: /^ \\s*/ },\n { token: \"comment\", regex: /^#.*/ },\n { token: \"constant.language.escape\", regex: \"^regex \", next: \"regex\" },\n { token: \"constant.language.escape\", regex: \"^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\\\b\" }\n ],\n \"regex\": [\n { token: \"text\", regex: \"\\\\.\" },\n { token: \"keyword\", regex: \"/\" },\n { token: \"empty\", regex: \"$\", next: \"start\" }\n ]\n };\n this.embedRules(SnippetHighlightRules, \"sn-\", [\n { token: \"text\", regex: \"^\\\\t\", next: \"sn-start\" },\n { onMatch: function (value, state, stack) {\n stack.splice(stack.length);\n return this.tokenName;\n }, tokenName: \"text\", regex: \"^(?!\\t)\", next: \"start\" }\n ]);\n};\noop.inherits(SnippetGroupHighlightRules, TextHighlightRules);\nexports.SnippetGroupHighlightRules = SnippetGroupHighlightRules;\nvar FoldMode = require(\"./folding/coffee\").FoldMode;\nvar Mode = function () {\n this.HighlightRules = SnippetGroupHighlightRules;\n this.foldingRules = new FoldMode();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.$indentWithTabs = true;\n this.lineCommentStart = \"#\";\n this.$id = \"ace/mode/snippets\";\n this.snippetFileId = \"ace/snippets/snippets\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/snippets\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","oop","BaseFoldMode","Range","FoldMode","session","foldStyle","row","range","re","line","startLevel","startColumn","maxRow","startRow","endRow","level","endColumn","indent","next","prev","prevIndent","nextIndent","TextMode","TextHighlightRules","SnippetHighlightRules","builtins","value","state","stack","SnippetGroupHighlightRules","Mode","m"],"mappings":"gaAAA,IAAI,OAAO,0BAA0B,CAAC,UAAU,UAAU,SAAS,cAAc,6BAA6B,WAAW,EAAG,SAASA,EAASC,EAASC,EAAO,CAC9J,IAAIC,EAAMH,EAAQ,eAAe,EAC7BI,EAAeJ,EAAQ,aAAa,EAAE,SACtCK,EAAQL,EAAQ,aAAa,EAAE,MAC/BM,EAAWL,EAAQ,SAAW,UAAY,CAAA,EAC9CE,EAAI,SAASG,EAAUF,CAAY,EAClC,UAAY,CACT,KAAK,mBAAqB,SAAUG,EAASC,EAAWC,EAAK,CACzD,IAAIC,EAAQ,KAAK,iBAAiBH,EAASE,CAAG,EAC9C,GAAIC,EACA,OAAOA,EACX,IAAIC,EAAK,KACLC,EAAOL,EAAQ,QAAQE,CAAG,EAC1BI,EAAaD,EAAK,OAAOD,CAAE,EAC/B,GAAI,EAAAE,GAAc,IAAMD,EAAKC,CAAU,GAAK,KAM5C,SAJIC,EAAcF,EAAK,OACnBG,EAASR,EAAQ,YACjBS,EAAWP,EACXQ,EAASR,EACN,EAAEA,EAAMM,GAAQ,CACnBH,EAAOL,EAAQ,QAAQE,CAAG,EAC1B,IAAIS,EAAQN,EAAK,OAAOD,CAAE,EAC1B,GAAIO,GAAS,GAEb,IAAIN,EAAKM,CAAK,GAA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