1(function(a){if(typeof exports=="object"&&typeof module=="object")a(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],a);else a(CodeMirror)})(function(a){"use strict";a.defineMode("lua",function(a,b){var c=a.indentUnit;function d(a){return new RegExp("^(?:"+a.join("|")+")","i")}function e(a){return new RegExp("^(?:"+a.join("|")+")$","i")}var f=e(b.specials||[]);var g=e(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]);var h=e(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]);var i=e(["function","if","repeat","do","\\(","{"]);var j=e(["end","until","\\)","}"]);var k=d(["end","until","\\)","}","else","elseif"]);function l(a){var b=0;while(a.eat("="))++b;a.eat("[");return b}function m(a,b){var c=a.next();if(c=="-"&&a.eat("-")){if(a.eat("[")&&a.eat("["))return(b.cur=n(l(a),"comment"))(a,b);a.skipToEnd();return"comment"}if(c=='"'||c=="'")return(b.cur=o(c))(a,b);if(c=="["&&/[\[=]/.test(a.peek()))return(b.cur=n(l(a),"string"))(a,b);if(/\d/.test(c)){a.eatWhile(/[\w.%]/);return"number"}if(/[\w_]/.test(c)){a.eatWhile(/[\w\\\-_.]/);return"variable"}return null}function n(a,b){return function(c,d){var e=null,f;while((f=c.next())!=null){if(e==null){if(f=="]")e=0}else if(f=="=")++e;else if(f=="]"&&e==a){d.cur=m;break}else e=null}return b}}function o(a){return function(b,c){var d=false,e;while((e=b.next())!=null){if(e==a&&!d)break;d=!d&&e=="\\"}if(!d)c.cur=m;return"string"}}return{startState:function(a){return{basecol:a||0,indentDepth:0,cur:m}},token:function(a,b){if(a.eatSpace())return null;var c=b.cur(a,b);var d=a.current();if(c=="variable"){if(h.test(d))c="keyword";else if(g.test(d))c="builtin";else if(f.test(d))c="variable-2"}if(c!="comment"&&c!="string"){if(i.test(d))++b.indentDepth;else if(j.test(d))--b.indentDepth}return c},indent:function(a,b){var d=k.test(b);return a.basecol+c*(a.indentDepth-(d?1:0))},lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}});a.defineMIME("text/x-lua","lua")});
2//# sourceMappingURL=lua.min.js.map