diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-06 15:53:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-06 15:53:57 +0800 |
commit | b2f11cdfc373606c212ec7e17af55a1cbb71acd0 (patch) | |
tree | cc16aeaa363eb376b5a95425cf72fe437be25cd9 /server/libs | |
parent | 958080727301e050bdaf1c7a2281b9c9e1988033 (diff) | |
download | lua-language-server-b2f11cdfc373606c212ec7e17af55a1cbb71acd0.zip |
先把所有的基础API都定义一下
Diffstat (limited to 'server/libs')
-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 |
11 files changed, 112 insertions, 21 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' |