openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 3.27 kB
JavaScript
import{n as e}from"./rolldown-runtime-DkW27tQK.js";function t(e){return RegExp(`^(?:`+e.join(`|`)+`)`,`i`)}function n(e){return RegExp(`^(?:`+e.join(`|`)+`)$`,`i`)}function r(e){for(var t=0;e.eat(`=`);)++t;return e.eat(`[`),t}function i(e,t){var n=e.next();return n==`-`&&e.eat(`-`)?e.eat(`[`)&&/[\[=]/.test(e.peek())?(t.cur=a(r(e),`comment`))(e,t):(e.skipToEnd(),`comment`):n==`"`||n==`'`?(t.cur=o(n))(e,t):n==`[`&&/[\[=]/.test(e.peek())?(t.cur=a(r(e),`string`))(e,t):/\d/.test(n)?(e.eatWhile(/[\w.%]/),`number`):/[\w_]/.test(n)?(e.eatWhile(/[\w\\\-_.]/),`variable`):null}function a(e,t){return function(n,r){for(var a=null,o;(o=n.next())!=null;)if(a==null)o==`]`&&(a=0);else if(o==`=`)++a;else if(o==`]`&&a==e){r.cur=i;break}else a=null;return t}}function o(e){return function(t,n){for(var r=!1,a;(a=t.next())!=null&&!(a==e&&!r);)r=!r&&a==`\\`;return r||(n.cur=i),`string`}}var s,c,l,u,d,f;function p(){return(p=e((()=>{s=n(`_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`.split(`,`)),c=n([`and`,`break`,`elseif`,`false`,`nil`,`not`,`or`,`return`,`true`,`function`,`end`,`if`,`then`,`else`,`do`,`while`,`repeat`,`until`,`for`,`in`,`local`]),l=n([`function`,`if`,`repeat`,`do`,`\\(`,`{`]),u=n([`end`,`until`,`\\)`,`}`]),d=t([`end`,`until`,`\\)`,`}`,`else`,`elseif`]),f={name:`lua`,startState:function(){return{basecol:0,indentDepth:0,cur:i}},token:function(e,t){if(e.eatSpace())return null;var n=t.cur(e,t),r=e.current();return n==`variable`&&(c.test(r)?n=`keyword`:s.test(r)&&(n=`builtin`)),n!=`comment`&&n!=`string`&&(l.test(r)?++t.indentDepth:u.test(r)&&--t.indentDepth),n},indent:function(e,t,n){var r=d.test(t);return e.basecol+n.unit*(e.indentDepth-+!!r)},languageData:{indentOnInput:/^\s*(?:end|until|else|\)|\})$/,commentTokens:{line:`--`,block:{open:`--[[`,close:`]]--`}}}}})))()}p();export{f as lua};
//# sourceMappingURL=lua-yYK_8aRA.js.map