Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/mode/lua/lua",["module","exports","require","../../lib/codemirror"],(function(e,t,r){var a,n=void 0;window;a=function(e){"use strict";e.defineMode("lua",(function(e,t){var r=e.indentUnit;function wordRE(e){return new RegExp("^(?:"+e.join("|")+")$","i")}var a=wordRE(t.specials||[]),n=wordRE(["_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"]),o=wordRE(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),i=wordRE(["function","if","repeat","do","\\(","{"]),l=wordRE(["end","until","\\)","}"]),u=function prefixRE(e){return new RegExp("^(?:"+e.join("|")+")","i")}(["end","until","\\)","}","else","elseif"]);function readBracket(e){for(var t=0;e.eat("=");)++t;return e.eat("["),t}function normal(e,t){var r=e.next();return"-"==r&&e.eat("-")?e.eat("[")&&e.eat("[")?(t.cur=bracketed(readBracket(e),"comment"))(e,t):(e.skipToEnd(),"comment"):'"'==r||"'"==r?(t.cur=function string(e){return function(t,r){for(var a,n=!1;null!=(a=t.next())&&(a!=e||n);)n=!n&&"\\"==a;return n||(r.cur=normal),"string"}}(r))(e,t):"["==r&&/[\[=]/.test(e.peek())?(t.cur=bracketed(readBracket(e),"string"))(e,t):/\d/.test(r)?(e.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(r)?(e.eatWhile(/[\w\\\-_.]/),"variable"):null}function bracketed(e,t){return function(r,a){for(var n,o=null;null!=(n=r.next());)if(null==o)"]"==n&&(o=0);else if("="==n)++o;else{if("]"==n&&o==e){a.cur=normal;break}o=null}return t}}return{startState:function(e){return{basecol:e||0,indentDepth:0,cur:normal}},token:function(e,t){if(e.eatSpace())return null;var r=t.cur(e,t),u=e.current();return"variable"==r&&(o.test(u)?r="keyword":n.test(u)?r="builtin":a.test(u)&&(r="variable-2")),"comment"!=r&&"string"!=r&&(i.test(u)?++t.indentDepth:l.test(u)&&--t.indentDepth),r},indent:function(e,t){var a=u.test(t);return e.basecol+r*(e.indentDepth-(a?1:0))},electricInput:/^\s*(?:end|until|else|\)|\})$/,lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}})),e.defineMIME("text/x-lua","lua")},"object"==typeof t&&"object"==typeof e?a(r("../../lib/codemirror")):"function"==typeof n&&n.amd?n(["../../lib/codemirror"],a):a(CodeMirror)}));
//# sourceMappingURL=lua.js.map