diff options
-rw-r--r-- | server/libs/lua53.ini | 21 | ||||
-rw-r--r-- | server/libs/lua53/basic.lni | 65 | ||||
-rw-r--r-- | server/libs/lua53/coroutine.lni | 5 | ||||
-rw-r--r-- | server/libs/lua53/debug.lni | 5 | ||||
-rw-r--r-- | server/libs/lua53/io.lni | 5 | ||||
-rw-r--r-- | server/libs/lua53/math.lni | 5 | ||||
-rw-r--r-- | server/libs/lua53/modules.lni | 7 | ||||
-rw-r--r-- | server/libs/lua53/os.lni | 5 | ||||
-rw-r--r-- | server/libs/lua53/string.lni | 5 | ||||
-rw-r--r-- | server/libs/lua53/table.lni | 5 | ||||
-rw-r--r-- | server/libs/lua53/utf8.lni | 5 | ||||
-rw-r--r-- | server/src/matcher/diagnostics.lua | 3 | ||||
-rw-r--r-- | server/src/matcher/find_lib.lua | 2 |
13 files changed, 116 insertions, 22 deletions
diff --git a/server/libs/lua53.ini b/server/libs/lua53.ini deleted file mode 100644 index f5772b44..00000000 --- a/server/libs/lua53.ini +++ /dev/null @@ -1,21 +0,0 @@ -[ipairs] -type = 'function' -description = [[ -Returns three values (an iterator function, the table t, and 0) so that the construction - - for i,v in ipairs(t) do body end -will iterate over the key–value pairs (1,t[1]), (2,t[2]), ..., up to the first nil value. -]] -[[.args]] -name = 't' -type = 'table' -[[.returns]] -name = 'iterator' -type = 'function' -[[.returns]] -name = 't' -type = 'table' -[[.returns]] -name = 'i' -type = 'number' -default = '0' diff --git a/server/libs/lua53/basic.lni b/server/libs/lua53/basic.lni new file mode 100644 index 00000000..28b7a66f --- /dev/null +++ b/server/libs/lua53/basic.lni @@ -0,0 +1,65 @@ +[default] +type = 'function' + +[assert] + +[collectgarbage] + +[dofile] + +[error] + +[_G] +type = 'table' + +[getmetatable] + +[ipairs] +[[.args]] +name = 't' +type = 'table' +[[.returns]] +name = 'iterator' +type = 'function' +[[.returns]] +name = 't' +type = 'table' +[[.returns]] +name = 'i' +type = 'number' +default = '0' + +[load] + +[loadfile] + +[next] + +[pairs] + +[pcall] + +[print] + +[rawequal] + +[rawget] + +[rawlen] + +[rawset] + +[select] + +[setmetatable] + +[tonumber] + +[tostring] + +[type] + +[_VERSION] +type = 'string' + +[xpcall] diff --git a/server/libs/lua53/coroutine.lni b/server/libs/lua53/coroutine.lni new file mode 100644 index 00000000..7f575257 --- /dev/null +++ b/server/libs/lua53/coroutine.lni @@ -0,0 +1,5 @@ +[default] +type = 'function' + +[coroutine] +type = 'table' diff --git a/server/libs/lua53/debug.lni b/server/libs/lua53/debug.lni new file mode 100644 index 00000000..1c300dbb --- /dev/null +++ b/server/libs/lua53/debug.lni @@ -0,0 +1,5 @@ +[default] +type = 'function' + +[debug] +type = 'table' diff --git a/server/libs/lua53/io.lni b/server/libs/lua53/io.lni new file mode 100644 index 00000000..d18055d2 --- /dev/null +++ b/server/libs/lua53/io.lni @@ -0,0 +1,5 @@ +[default] +type = 'function' + +[io] +type = 'table' diff --git a/server/libs/lua53/math.lni b/server/libs/lua53/math.lni new file mode 100644 index 00000000..d46d564e --- /dev/null +++ b/server/libs/lua53/math.lni @@ -0,0 +1,5 @@ +[default] +type = 'function' + +[math] +type = 'table' diff --git a/server/libs/lua53/modules.lni b/server/libs/lua53/modules.lni new file mode 100644 index 00000000..ea3f2100 --- /dev/null +++ b/server/libs/lua53/modules.lni @@ -0,0 +1,7 @@ +[default] +type = 'function' + +[require] + +[package] +type = 'table' diff --git a/server/libs/lua53/os.lni b/server/libs/lua53/os.lni new file mode 100644 index 00000000..e1e0630a --- /dev/null +++ b/server/libs/lua53/os.lni @@ -0,0 +1,5 @@ +[default] +type = 'function' + +[os] +type = 'table' diff --git a/server/libs/lua53/string.lni b/server/libs/lua53/string.lni new file mode 100644 index 00000000..0c1fc2b8 --- /dev/null +++ b/server/libs/lua53/string.lni @@ -0,0 +1,5 @@ +[default] +type = 'function' + +[string] +type = 'table' diff --git a/server/libs/lua53/table.lni b/server/libs/lua53/table.lni new file mode 100644 index 00000000..5cb9a951 --- /dev/null +++ b/server/libs/lua53/table.lni @@ -0,0 +1,5 @@ +[default] +type = 'function' + +[table] +type = 'table' diff --git a/server/libs/lua53/utf8.lni b/server/libs/lua53/utf8.lni new file mode 100644 index 00000000..abe7f603 --- /dev/null +++ b/server/libs/lua53/utf8.lni @@ -0,0 +1,5 @@ +[default] +type = 'function' + +[utf8] +type = 'table' diff --git a/server/src/matcher/diagnostics.lua b/server/src/matcher/diagnostics.lua index 4b05092e..9c2e4efd 100644 --- a/server/src/matcher/diagnostics.lua +++ b/server/src/matcher/diagnostics.lua @@ -31,6 +31,9 @@ local function searchUndefinedGlobal(results, callback) then goto NEXT_VAR end + if var.key == 'log' then + goto NEXT_VAR + end if not var.key:find '%l' then goto NEXT_VAR end diff --git a/server/src/matcher/find_lib.lua b/server/src/matcher/find_lib.lua index 968f5cf2..92d90e50 100644 --- a/server/src/matcher/find_lib.lua +++ b/server/src/matcher/find_lib.lua @@ -9,7 +9,7 @@ local function getLibs() for path in io.scan(ROOT / 'libs') do local buf = io.load(path) if buf then - lni.classics(buf, path:string(), {Libs}) + xpcall(lni.classics, log.error, buf, path:string(), {Libs}) end end return Libs |