1 |
- {"version":3,"file":"mode-livescript-29be4b76.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-livescript.js"],"sourcesContent":["ace.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/livescript\",[\"require\",\"exports\",\"module\",\"ace/tokenizer\",\"ace/mode/matching_brace_outdent\",\"ace/mode/behaviour/cstyle\",\"ace/mode/text\"], function(require, exports, module){var identifier, LiveScriptMode, keywordend, stringfill;\nidentifier = '(?![\\\\d\\\\s])[$\\\\w\\\\xAA-\\\\uFFDC](?:(?!\\\\s)[$\\\\w\\\\xAA-\\\\uFFDC]|-[A-Za-z])*';\nexports.Mode = LiveScriptMode = (function (superclass) {\n var indenter, prototype = extend$((import$(LiveScriptMode, superclass).displayName = 'LiveScriptMode', LiveScriptMode), superclass).prototype, constructor = LiveScriptMode;\n function LiveScriptMode() {\n var that;\n this.$tokenizer = new (require('../tokenizer')).Tokenizer(LiveScriptMode.Rules);\n if (that = require('../mode/matching_brace_outdent')) {\n this.$outdent = new that.MatchingBraceOutdent;\n }\n this.$id = \"ace/mode/livescript\";\n this.$behaviour = new (require(\"./behaviour/cstyle\").CstyleBehaviour)();\n }\n indenter = RegExp('(?:[({[=:]|[-~]>|\\\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\\\s*all)?|const|var|let|new|catch(?:\\\\s*' + identifier + ')?))\\\\s*$');\n prototype.getNextLineIndent = function (state, line, tab) {\n var indent, tokens;\n indent = this.$getIndent(line);\n tokens = this.$tokenizer.getLineTokens(line, state).tokens;\n if (!(tokens.length && tokens[tokens.length - 1].type === 'comment')) {\n if (state === 'start' && indenter.test(line)) {\n indent += tab;\n }\n }\n return indent;\n };\n prototype.lineCommentStart = \"#\";\n prototype.blockComment = { start: \"###\", end: \"###\" };\n prototype.checkOutdent = function (state, line, input) {\n var ref$;\n return (ref$ = this.$outdent) != null ? ref$.checkOutdent(line, input) : void 8;\n };\n prototype.autoOutdent = function (state, doc, row) {\n var ref$;\n return (ref$ = this.$outdent) != null ? ref$.autoOutdent(doc, row) : void 8;\n };\n return LiveScriptMode;\n}(require('../mode/text').Mode));\nkeywordend = '(?![$\\\\w]|-[A-Za-z]|\\\\s*:(?![:=]))';\nstringfill = {\n defaultToken: 'string'\n};\nLiveScriptMode.Rules = {\n start: [\n {\n token: 'keyword',\n regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend\n }, {\n token: 'constant.language',\n regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend\n }, {\n token: 'invalid.illegal',\n regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend\n }, {\n token: 'language.support.class',\n regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend\n }, {\n token: 'language.support.function',\n regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend\n }, {\n token: 'variable.language',\n regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend\n }, {\n token: 'identifier',\n regex: identifier + '\\\\s*:(?![:=])'\n }, {\n token: 'variable',\n regex: identifier\n }, {\n token: 'keyword.operator',\n regex: '(?:\\\\.{3}|\\\\s+\\\\?)'\n }, {\n token: 'keyword.variable',\n regex: '(?:@+|::|\\\\.\\\\.)',\n next: 'key'\n }, {\n token: 'keyword.operator',\n regex: '\\\\.\\\\s*',\n next: 'key'\n }, {\n token: 'string',\n regex: '\\\\\\\\\\\\S[^\\\\s,;)}\\\\]]*'\n }, {\n token: 'string.doc',\n regex: '\\'\\'\\'',\n next: 'qdoc'\n }, {\n token: 'string.doc',\n regex: '\"\"\"',\n next: 'qqdoc'\n }, {\n token: 'string',\n regex: '\\'',\n next: 'qstring'\n }, {\n token: 'string',\n regex: '\"',\n next: 'qqstring'\n }, {\n token: 'string',\n regex: '`',\n next: 'js'\n }, {\n token: 'string',\n regex: '<\\\\[',\n next: 'words'\n }, {\n token: 'string.regex',\n regex: '//',\n next: 'heregex'\n }, {\n token: 'comment.doc',\n regex: '/\\\\*',\n next: 'comment'\n }, {\n token: 'comment',\n regex: '#.*'\n }, {\n token: 'string.regex',\n regex: '\\\\/(?:[^[\\\\/\\\\n\\\\\\\\]*(?:(?:\\\\\\\\.|\\\\[[^\\\\]\\\\n\\\\\\\\]*(?:\\\\\\\\.[^\\\\]\\\\n\\\\\\\\]*)*\\\\])[^[\\\\/\\\\n\\\\\\\\]*)*)\\\\/[gimy$]{0,4}',\n next: 'key'\n }, {\n token: 'constant.numeric',\n regex: '(?:0x[\\\\da-fA-F][\\\\da-fA-F_]*|(?:[2-9]|[12]\\\\d|3[0-6])r[\\\\da-zA-Z][\\\\da-zA-Z_]*|(?:\\\\d[\\\\d_]*(?:\\\\.\\\\d[\\\\d_]*)?|\\\\.\\\\d[\\\\d_]*)(?:e[+-]?\\\\d[\\\\d_]*)?[\\\\w$]*)'\n }, {\n token: 'lparen',\n regex: '[({[]'\n }, {\n token: 'rparen',\n regex: '[)}\\\\]]',\n next: 'key'\n }, {\n token: 'keyword.operator',\n regex: '[\\\\^!|&%+\\\\-]+'\n }, {\n token: 'text',\n regex: '\\\\s+'\n }\n ],\n heregex: [\n {\n token: 'string.regex',\n regex: '.*?//[gimy$?]{0,4}',\n next: 'start'\n }, {\n token: 'string.regex',\n regex: '\\\\s*#{'\n }, {\n token: 'comment.regex',\n regex: '\\\\s+(?:#.*)?'\n }, {\n defaultToken: 'string.regex'\n }\n ],\n key: [\n {\n token: 'keyword.operator',\n regex: '[.?@!]+'\n }, {\n token: 'identifier',\n regex: identifier,\n next: 'start'\n }, {\n token: 'text',\n regex: '',\n next: 'start'\n }\n ],\n comment: [\n {\n token: 'comment.doc',\n regex: '.*?\\\\*/',\n next: 'start'\n }, {\n defaultToken: 'comment.doc'\n }\n ],\n qdoc: [\n {\n token: 'string',\n regex: \".*?'''\",\n next: 'key'\n }, stringfill\n ],\n qqdoc: [\n {\n token: 'string',\n regex: '.*?\"\"\"',\n next: 'key'\n }, stringfill\n ],\n qstring: [\n {\n token: 'string',\n regex: '[^\\\\\\\\\\']*(?:\\\\\\\\.[^\\\\\\\\\\']*)*\\'',\n next: 'key'\n }, stringfill\n ],\n qqstring: [\n {\n token: 'string',\n regex: '[^\\\\\\\\\"]*(?:\\\\\\\\.[^\\\\\\\\\"]*)*\"',\n next: 'key'\n }, stringfill\n ],\n js: [\n {\n token: 'string',\n regex: '[^\\\\\\\\`]*(?:\\\\\\\\.[^\\\\\\\\`]*)*`',\n next: 'key'\n }, stringfill\n ],\n words: [\n {\n token: 'string',\n regex: '.*?\\\\]>',\n next: 'key'\n }, stringfill\n ]\n};\nfunction extend$(sub, sup) {\n function fun() { }\n fun.prototype = (sub.superclass = sup).prototype;\n (sub.prototype = new fun).constructor = sub;\n if (typeof sup.extended == 'function')\n sup.extended(sub);\n return sub;\n}\nfunction import$(obj, src) {\n var own = {}.hasOwnProperty;\n for (var key in src)\n if (own.call(src, key))\n obj[key] = src[key];\n return obj;\n}\n\n}); (function() {\n ace.require([\"ace/mode/livescript\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","Range","MatchingBraceOutdent","line","input","doc","row","match","column","openBracePos","indent","identifier","LiveScriptMode","keywordend","stringfill","superclass","indenter","prototype","extend$","import$","that","state","tab","tokens","ref$","sub","sup","fun","obj","src","own","key","m"],"mappings":"gaAAA,IAAI,OAAO,kCAAkC,CAAC,UAAU,UAAU,SAAS,WAAW,EAAG,SAASA,EAASC,EAASC,EAAO,CAC3H,IAAIC,EAAQH,EAAQ,UAAU,EAAE,MAC5BI,EAAuB,UAAY,IACtC,UAAY,CACT,KAAK,aAAe,SAAUC,EAAMC,EAAO,CACvC,MAAK,QAAQ,KAAKD,CAAI,EAEf,SAAS,KAAKC,CAAK,EADf,EAEnB,EACI,KAAK,YAAc,SAAUC,EAAKC,EAAK,CACnC,IAAIH,EAAOE,EAAI,QAAQC,CAAG,EACtBC,EAAQJ,EAAK,MAAM,UAAU,EACjC,GAAI,CAACI,EACD,MAAO,GACX,IAAIC,EAASD,EAAM,CAAC,EAAE,OAClBE,EAAeJ,EAAI,oBAAoB,CAAE,IAAKC,EAAK,OAAQE,CAAM,CAAE,EACvE,GAAI,CAACC,GAAgBA,EAAa,KAAOH,EACrC,MAAO,GACX,IAAII,EAAS,KAAK,WAAWL,EAAI,QAAQI,EAAa,GAAG,CAAC,EAC1DJ,EAAI,QAAQ,IAAIJ,EAAMK,EAAK,EAAGA,EAAKE,EAAS,CAAC,EAAGE,CAAM,CA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,mBACP,MAAO,6JACnB,EAAW,CACC,MAAO,SACP,MAAO,OACnB,EAAW,CACC,MAAO,SACP,MAAO,UACP,KAAM,KAClB,EAAW,CACC,MAAO,mBACP,MAAO,gBACnB,EAAW,CACC,MAAO,OACP,MAAO,MACV,CACJ,EACD,QAAS,CACL,CACI,MAAO,eACP,MAAO,qBACP,KAAM,OAClB,EAAW,CACC,MAAO,eACP,MAAO,QACnB,EAAW,CACC,MAAO,gBACP,MAAO,cACnB,EAAW,CACC,aAAc,cACjB,CACJ,EACD,IAAK,CACD,CACI,MAAO,mBACP,MAAO,SACnB,EAAW,CACC,MAAO,aACP,MAAOA,EACP,KAAM,OAClB,EAAW,CACC,MAAO,OACP,MAAO,GACP,KAAM,OACT,CACJ,EACD,QAAS,CACL,CACI,MAAO,cACP,MAAO,UACP,KAAM,OAClB,EAAW,CACC,aAAc,aACjB,CACJ,EACD,KAAM,CACF,CACI,MAAO,SACP,MAAO,SACP,KAAM,KAClB,EAAWG,CACN,EACD,MAAO,CACH,CACI,MAAO,SACP,MAAO,SACP,KAAM,KAClB,EAAWA,CACN,EACD,QAAS,CACL,CACI,MAAO,SACP,MAAO,gCACP,KAAM,KAClB,EAAWA,CACN,EACD,SAAU,CACN,CACI,MAAO,SACP,MAAO,gCACP,KAAM,KAClB,EAAWA,CACN,EACD,GAAI,CACA,CACI,MAAO,SACP,MAAO,gCACP,KAAM,KAClB,EAAWA,CACN,EACD,MAAO,CACH,CACI,MAAO,SACP,MAAO,UACP,KAAM,KAClB,EAAWA,CACN,CACL,EACA,SAASI,EAAQO,EAAKC,EAAK,CACvB,SAASC,GAAM,CAAG,CAClB,OAAAA,EAAI,WAAaF,EAAI,WAAaC,GAAK,WACtCD,EAAI,UAAY,IAAIE,GAAK,YAAcF,EACpC,OAAOC,EAAI,UAAY,YACvBA,EAAI,SAASD,CAAG,EACbA,CACV,CACD,SAASN,EAAQS,EAAKC,EAAK,CACvB,IAAIC,EAAM,CAAE,EAAC,eACb,QAASC,KAAOF,EACRC,EAAI,KAAKD,EAAKE,CAAG,IACjBH,EAAIG,CAAG,EAAIF,EAAIE,CAAG,GAC1B,OAAOH,CACV,CAED,CAAC,EAAmB,UAAW,CACX,IAAI,QAAQ,CAAC,qBAAqB,EAAG,SAASI,EAAG,CACkBhC,IAC3DA,EAAA,QAAiBgC,EAE7C,CAAqB,CACrB","x_google_ignoreList":[0]}
|