1 |
- {"version":3,"file":"mode-jack-31190241.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-jack.js"],"sourcesContent":["ace.define(\"ace/mode/jack_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 JackHighlightRules = function () {\n this.$rules = {\n \"start\": [\n {\n token: \"string\",\n regex: '\"',\n next: \"string2\"\n }, {\n token: \"string\",\n regex: \"'\",\n next: \"string1\"\n }, {\n token: \"constant.numeric\",\n regex: \"-?0[xX][0-9a-fA-F]+\\\\b\"\n }, {\n token: \"constant.numeric\",\n regex: \"(?:0|[-+]?[1-9][0-9]*)\\\\b\"\n }, {\n token: \"constant.binary\",\n regex: \"<[0-9A-Fa-f][0-9A-Fa-f](\\\\s+[0-9A-Fa-f][0-9A-Fa-f])*>\"\n }, {\n token: \"constant.language.boolean\",\n regex: \"(?:true|false)\\\\b\"\n }, {\n token: \"constant.language.null\",\n regex: \"null\\\\b\"\n }, {\n token: \"storage.type\",\n regex: \"(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\\\b\"\n }, {\n token: \"keyword\",\n regex: \"(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\\\b\"\n }, {\n token: \"language.builtin\",\n regex: \"(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\\\?|i-any\\\\?|i-collect|i-zip|i-merge|i-each)\\\\b\"\n }, {\n token: \"comment\",\n regex: \"--.*$\"\n }, {\n token: \"paren.lparen\",\n regex: \"[[({]\"\n }, {\n token: \"paren.rparen\",\n regex: \"[\\\\])}]\"\n }, {\n token: \"storage.form\",\n regex: \"@[a-z]+\"\n }, {\n token: \"constant.other.symbol\",\n regex: ':+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?'\n }, {\n token: \"variable\",\n regex: '[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?'\n }, {\n token: \"keyword.operator\",\n regex: \"\\\\|\\\\||\\\\^\\\\^|&&|!=|==|<=|<|>=|>|\\\\+|-|\\\\*|\\\\/|\\\\^|\\\\%|\\\\#|\\\\!\"\n }, {\n token: \"text\",\n regex: \"\\\\s+\"\n }\n ],\n \"string1\": [\n {\n token: \"constant.language.escape\",\n regex: /\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['\"\\\\\\/bfnrt])/\n }, {\n token: \"string\",\n regex: \"[^'\\\\\\\\]+\"\n }, {\n token: \"string\",\n regex: \"'\",\n next: \"start\"\n }, {\n token: \"string\",\n regex: \"\",\n next: \"start\"\n }\n ],\n \"string2\": [\n {\n token: \"constant.language.escape\",\n regex: /\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['\"\\\\\\/bfnrt])/\n }, {\n token: \"string\",\n regex: '[^\"\\\\\\\\]+'\n }, {\n token: \"string\",\n regex: '\"',\n next: \"start\"\n }, {\n token: \"string\",\n regex: \"\",\n next: \"start\"\n }\n ]\n };\n};\noop.inherits(JackHighlightRules, TextHighlightRules);\nexports.JackHighlightRules = JackHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar MatchingBraceOutdent = 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 return line.match(/^\\s*/)[0];\n };\n}).call(MatchingBraceOutdent.prototype);\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\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/jack\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/jack_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/mode/folding/cstyle\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar HighlightRules = require(\"./jack_highlight_rules\").JackHighlightRules;\nvar MatchingBraceOutdent = require(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar CStyleFoldMode = require(\"./folding/cstyle\").FoldMode;\nvar Mode = function () {\n this.HighlightRules = HighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = this.$defaultBehaviour;\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \"--\";\n this.getNextLineIndent = function (state, line, tab) {\n var indent = this.$getIndent(line);\n if (state == \"start\") {\n var match = line.match(/^.*[\\{\\(\\[]\\s*$/);\n if (match) {\n indent += tab;\n }\n }\n return indent;\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/jack\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/jack\"], 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","JackHighlightRules","Range","MatchingBraceOutdent","line","input","doc","row","match","column","openBracePos","indent","BaseFoldMode","FoldMode","commentRegex","session","foldStyle","fw","forceMultiline","i","range","startIndent","startRow","startColumn","endRow","maxRow","subRange","re","depth","m","TextMode","HighlightRules","CStyleFoldMode","Mode","state","tab"],"mappings":"gaAAA,IAAI,OAAO,gCAAgC,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CAC3J,IAAIC,EAAMH,EAAQ,YAAY,EAC1BI,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDK,EAAqB,UAAY,CACjC,KAAK,OAAS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