summaryrefslogtreecommitdiff
path: root/server/libs
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-04-05 12:26:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-04-05 12:26:44 +0800
commit4f94d3500d6d7b6d082647359011d2ca103741db (patch)
tree10ab0e987ba03431aacbf0e6f0bebfdeb1d0f456 /server/libs
parentda00d824100381c52a81b9e6f1d824e6b344755d (diff)
downloadlua-language-server-4f94d3500d6d7b6d082647359011d2ca103741db.zip
一些API更新与翻译
Diffstat (limited to 'server/libs')
-rw-r--r--server/libs/lua/io.lni70
-rw-r--r--server/libs/lua/math.lni61
-rw-r--r--server/libs/lua/string.lni3
3 files changed, 131 insertions, 3 deletions
diff --git a/server/libs/lua/io.lni b/server/libs/lua/io.lni
index 94e62ae9..bf59969f 100644
--- a/server/libs/lua/io.lni
+++ b/server/libs/lua/io.lni
@@ -61,7 +61,44 @@ optional = 'self'
type = 'FILE*'
optional = 'self'
-[lines]
+["lines Lua 5.1"]
+name = 'lines'
+version = {'Lua 5.1', 'Lua 5.2'}
+[[.args]]
+name = 'filename'
+type = 'string'
+optional = 'after'
+``````````
+name = 'mode'
+type = '...'
+[[.returns]]
+type = 'function'
+returns = {
+ 1 = {
+ name = 'c',
+ type = {'string', 'number'},
+ }
+}
+[[.enums]]
+name = 'mode'
+enum = '*n'
+``````````
+name = 'mode'
+enum = '*a'
+``````````
+name = 'mode'
+enum = '*l'
+default = true
+``````````
+name = 'mode'
+enum = '*L'
+``````````
+name = 'mode'
+code = 'number'
+
+["lines Lua 5.3"]
+name = 'lines'
+version = {'Lua 5.3', 'Lua 5.4'}
[[.args]]
name = 'filename'
type = 'string'
@@ -147,7 +184,36 @@ default = true
name = 'mode'
enum = 'w'
-[read]
+["read Lua 5.1"]
+name = 'read'
+version = {'Lua 5.3', 'Lua 5.4'}
+[[.args]]
+name = 'mode'
+type = '...'
+[[.returns]]
+type = {'string', 'number'}
+``````````
+type = '...'
+[[.enums]]
+name = 'mode'
+enum = '*n'
+``````````
+name = 'mode'
+enum = '*a'
+``````````
+name = 'mode'
+enum = '*l'
+default = true
+``````````
+name = 'mode'
+enum = '*L'
+``````````
+name = 'mode'
+code = 'number'
+
+["read Lua 5.3"]
+name = 'read'
+version = {'Lua 5.3', 'Lua 5.4'}
[[.args]]
name = 'mode'
type = '...'
diff --git a/server/libs/lua/math.lni b/server/libs/lua/math.lni
index cd24c094..4098d29e 100644
--- a/server/libs/lua/math.lni
+++ b/server/libs/lua/math.lni
@@ -40,7 +40,31 @@ type = 'number'
[[.returns]]
type = 'number'
-[atan]
+["atan Lua 5.1"]
+name = 'atan'
+version = {'Lua 5.1', 'Lua 5.2'}
+[[.args]]
+name = 'y'
+type = 'number'
+[[.returns]]
+type = 'number'
+
+["atan Lua 5.3"]
+name = 'atan'
+version = {'Lua 5.3', 'Lua 5.4'}
+[[.args]]
+name = 'y'
+type = 'number'
+``````````
+name = 'x'
+type = 'number'
+optional = 'self'
+default = 1
+[[.returns]]
+type = 'number'
+
+[atan2]
+version = {'Lua 5.1', 'Lua 5.2'}
[[.args]]
name = 'y'
type = 'number'
@@ -66,6 +90,14 @@ type = 'number'
[[.returns]]
type = 'number'
+[cosh]
+version = {'Lua 5.1', 'Lua 5.2'}
+[[.args]]
+name = 'x'
+type = 'number'
+[[.returns]]
+type = 'number'
+
[deg]
[[.args]]
name = 'x'
@@ -148,6 +180,17 @@ type = 'number'
[pi]
type = 'number'
+[power]
+version = {'Lua 5.1', 'Lua 5.2'}
+[[.args]]
+name = 'x'
+type = 'number'
+``````````
+name = 'y'
+type = 'number'
+[[.returns]]
+type = 'number'
+
[rad]
[[.args]]
name = 'x'
@@ -192,6 +235,14 @@ type = 'number'
[[.returns]]
type = 'number'
+[sinh]
+version = {'Lua 5.1', 'Lua 5.2'}
+[[.args]]
+name = 'x'
+type = 'number'
+[[.returns]]
+type = 'number'
+
[sqrt]
[[.args]]
name = 'x'
@@ -206,6 +257,14 @@ type = 'number'
[[.returns]]
type = 'number'
+[tanh]
+version = {'Lua 5.1', 'Lua 5.2'}
+[[.args]]
+name = 'x'
+type = 'number'
+[[.returns]]
+type = 'number'
+
[tointeger]
[[.args]]
name = 'x'
diff --git a/server/libs/lua/string.lni b/server/libs/lua/string.lni
index a45be1d1..bd454fc0 100644
--- a/server/libs/lua/string.lni
+++ b/server/libs/lua/string.lni
@@ -181,6 +181,7 @@ name = 'captured'
type = 'string'
[pack]
+version = {'Lua 5.3', 'Lua 5.4'}
[[.args]]
name = 'fmt'
type = 'string'
@@ -197,6 +198,7 @@ name = 'binary'
type = 'string'
[packsize]
+version = {'Lua 5.3', 'Lua 5.4'}
[[.args]]
name = 'fmt'
type = 'string'
@@ -238,6 +240,7 @@ default = -1
type = 'string'
[unpack]
+version = {'Lua 5.3', 'Lua 5.4'}
[[.args]]
name = 'fmt'
type = 'string'