diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-09 15:56:36 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-09 15:56:36 +0800 |
commit | d29789157f0988dd0f189c35ed581cb3cfdeb5c8 (patch) | |
tree | fa073a6cfc5dc32a8e6f691064a61d3978fb9eaf /server/locale | |
parent | 79961aa0bd5ea6d297683e976165ea70866c12d3 (diff) | |
download | lua-language-server-d29789157f0988dd0f189c35ed581cb3cfdeb5c8.zip |
LuaJIT的API
Diffstat (limited to 'server/locale')
-rw-r--r-- | server/locale/en-US/libs/@lua/debug.lni | 34 | ||||
-rw-r--r-- | server/locale/en-US/libs/@lua/io.lni | 61 | ||||
-rw-r--r-- | server/locale/en-US/libs/@lua/os.lni | 3 | ||||
-rw-r--r-- | server/locale/en-US/libs/@lua/string.lni | 3 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/@lua/debug.lni | 36 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/@lua/io.lni | 61 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/@lua/os.lni | 3 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/@lua/string.lni | 3 |
8 files changed, 187 insertions, 17 deletions
diff --git a/server/locale/en-US/libs/@lua/debug.lni b/server/locale/en-US/libs/@lua/debug.lni index 42422ae6..4c7bd016 100644 --- a/server/locale/en-US/libs/@lua/debug.lni +++ b/server/locale/en-US/libs/@lua/debug.lni @@ -38,9 +38,43 @@ name = 'what' enum = 'L' description = '`activelines`' +['getinfo Lua 5.1'] +description = 'Returns a table with information about a function.' +[[.enums]] +name = 'what' +enum = 'n' +description = '`name` and `namewhat`' +`````````` +name = 'what' +enum = 'S' +description = '`source`, `short_src`, `linedefined`, `lastlinedefined`, and `what`' +`````````` +name = 'what' +enum = 'l' +description = '`currentline`' +`````````` +name = 'what' +enum = 't' +description = '`istailcall`' +`````````` +name = 'what' +enum = 'u' +description = '`nups`' +`````````` +name = 'what' +enum = 'f' +description = '`func`' +`````````` +name = 'what' +enum = 'L' +description = '`activelines`' + [getlocal] description = 'Returns the name and the value of the local variable with index `local` of the function at level `f` of the stack.' +['getlocal Lua 5.1'] +description = 'Returns the name and the value of the local variable with index `local` of the function at level `level` of the stack.' + [getmetatable] description = 'Returns the metatable of the given value.' diff --git a/server/locale/en-US/libs/@lua/io.lni b/server/locale/en-US/libs/@lua/io.lni index 6b25495f..68cf8830 100644 --- a/server/locale/en-US/libs/@lua/io.lni +++ b/server/locale/en-US/libs/@lua/io.lni @@ -39,10 +39,6 @@ enum = '*l' description = 'Reads the next line skipping the end of line.' `````````` name = 'mode' -enum = '*L' -description = 'Reads the next line keeping the end of line.' -`````````` -name = 'mode' code = 'number' description = 'Reads a string with up to this number of bytes.' @@ -76,6 +72,36 @@ name = 'mode' code = 'number' description = 'Reads a string with up to this number of bytes.' +["lines LuaJIT"] +description = [[ +------ +```lua +for c in io.lines(filename, ...) do + body +end +``` +]] +[[.enums]] +name = 'mode' +enum = '*n' +description = 'Reads a numeral and returns it as number.' +`````````` +name = 'mode' +enum = '*a' +description = 'Reads the whole file.' +`````````` +name = 'mode' +enum = '*l' +description = 'Reads the next line skipping the end of line.' +`````````` +name = 'mode' +enum = '*L' +description = 'Reads the next line keeping the end of line.' +`````````` +name = 'mode' +code = 'number' +description = 'Reads a string with up to this number of bytes.' + [open] description = 'Opens a file, in the mode specified in the string `mode`.' [[.enums]] @@ -133,10 +159,6 @@ enum = '*l' description = 'Reads the next line skipping the end of line.' `````````` name = 'mode' -enum = '*L' -description = 'Reads the next line keeping the end of line.' -`````````` -name = 'mode' code = 'number' description = 'Reads a string with up to this number of bytes.' @@ -163,6 +185,29 @@ name = 'mode' code = 'number' description = 'Reads a string with up to this number of bytes.' +["read LuaJIT"] +description = 'Reads the `file`, according to the given formats, which specify what to read.' +[[.enums]] +name = 'mode' +enum = '*n' +description = 'Reads a numeral and returns it as number.' +`````````` +name = 'mode' +enum = '*a' +description = 'Reads the whole file.' +`````````` +name = 'mode' +enum = '*l' +description = 'Reads the next line skipping the end of line.' +`````````` +name = 'mode' +enum = '*L' +description = 'Reads the next line keeping the end of line.' +`````````` +name = 'mode' +code = 'number' +description = 'Reads a string with up to this number of bytes.' + [tmpfile] description = 'In case of success, returns a handle for a temporary file.' diff --git a/server/locale/en-US/libs/@lua/os.lni b/server/locale/en-US/libs/@lua/os.lni index 8be67434..82b7c228 100644 --- a/server/locale/en-US/libs/@lua/os.lni +++ b/server/locale/en-US/libs/@lua/os.lni @@ -16,6 +16,9 @@ description = 'Passes `command` to be executed by an operating system shell.' [exit] description = 'Calls the ISO C function `exit` to terminate the host program.' +['exit Lua 5.1'] +description = 'Calls the C function `exit` to terminate the host program.' + [getenv] description = 'Returns the value of the process environment variable `varname`.' diff --git a/server/locale/en-US/libs/@lua/string.lni b/server/locale/en-US/libs/@lua/string.lni index 3c7b987d..2055b16b 100644 --- a/server/locale/en-US/libs/@lua/string.lni +++ b/server/locale/en-US/libs/@lua/string.lni @@ -56,6 +56,9 @@ description = 'Returns the size of a string resulting from `string.pack` with th [rep] description = 'Returns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.' +['rep Lua 5.1'] +description = 'Returns a string that is the concatenation of `n` copies of the string `s` .' + [reverse] description = 'Returns a string that is the string `s` reversed.' diff --git a/server/locale/zh-CN/libs/@lua/debug.lni b/server/locale/zh-CN/libs/@lua/debug.lni index 22e6d3b3..8783b8e3 100644 --- a/server/locale/zh-CN/libs/@lua/debug.lni +++ b/server/locale/zh-CN/libs/@lua/debug.lni @@ -38,8 +38,42 @@ name = 'what' enum = 'L' description = '`activelines`' +['getinfo Lua 5.1'] +description = '返回关于一个函数信息的表。' +[[.enums]] +name = 'what' +enum = 'n' +description = '`name` 和 `namewhat`' +`````````` +name = 'what' +enum = 'S' +description = '`source`,`short_src`,`linedefined`,`lastlinedefined`,和 `what`' +`````````` +name = 'what' +enum = 'l' +description = '`currentline`' +`````````` +name = 'what' +enum = 't' +description = '`istailcall`' +`````````` +name = 'what' +enum = 'u' +description = '`nups`' +`````````` +name = 'what' +enum = 'f' +description = '`func`' +`````````` +name = 'what' +enum = 'L' +description = '`activelines`' + [getlocal] -description = '返回在栈的 `f` 层处函数的索引为 `local` 的局部变量 的名字和值。' +description = '返回在栈的 `f` 层处函数的索引为 `local` 的局部变量的名字和值。' + +['getlocal Lua 5.1'] +description = '返回在栈的 `level` 层处函数的索引为 `local` 的局部变量的名字和值。' [getmetatable] description = '返回给定 `value` 的元表。' diff --git a/server/locale/zh-CN/libs/@lua/io.lni b/server/locale/zh-CN/libs/@lua/io.lni index 4a8a72a0..8881777f 100644 --- a/server/locale/zh-CN/libs/@lua/io.lni +++ b/server/locale/zh-CN/libs/@lua/io.lni @@ -39,10 +39,6 @@ enum = '*l' description = '读取一行并忽略行结束标记。' `````````` name = 'mode' -enum = '*L' -description = '读取一行并保留行结束标记。' -`````````` -name = 'mode' code = 'number' description = '读取一个不超过这个数量字节数的字符串。' @@ -76,6 +72,36 @@ name = 'mode' code = 'number' description = '读取一个不超过这个数量字节数的字符串。' +["lines LuaJIT"] +description = [[ +------ +```lua +for c in io.lines(filename, ...) do + body +end +``` +]] +[[.enums]] +name = 'mode' +enum = '*n' +description = '读取一个数字,根据 Lua 的转换文法返回浮点数或整数。' +`````````` +name = 'mode' +enum = '*a' +description = '从当前位置开始读取整个文件。' +`````````` +name = 'mode' +enum = '*l' +description = '读取一行并忽略行结束标记。' +`````````` +name = 'mode' +enum = '*L' +description = '读取一行并保留行结束标记。' +`````````` +name = 'mode' +code = 'number' +description = '读取一个不超过这个数量字节数的字符串。' + [open] description = '用字符串 `mode` 指定的模式打开一个文件。' [[.enums]] @@ -133,10 +159,6 @@ enum = '*l' description = '读取一行并忽略行结束标记。' `````````` name = 'mode' -enum = '*L' -description = '读取一行并保留行结束标记。' -`````````` -name = 'mode' code = 'number' description = '读取一个不超过这个数量字节数的字符串。' @@ -163,6 +185,29 @@ name = 'mode' code = 'number' description = '读取一个不超过这个数量字节数的字符串。' +["read LuaJIT"] +description = '读文件 `file`, 指定的格式决定了要读什么。' +[[.enums]] +name = 'mode' +enum = '*n' +description = '读取一个数字,根据 Lua 的转换文法返回浮点数或整数。' +`````````` +name = 'mode' +enum = '*a' +description = '从当前位置开始读取整个文件。' +`````````` +name = 'mode' +enum = '*l' +description = '读取一行并忽略行结束标记。' +`````````` +name = 'mode' +enum = '*L' +description = '读取一行并保留行结束标记。' +`````````` +name = 'mode' +code = 'number' +description = '读取一个不超过这个数量字节数的字符串。' + [tmpfile] description = '如果成功,返回一个临时文件的句柄。' diff --git a/server/locale/zh-CN/libs/@lua/os.lni b/server/locale/zh-CN/libs/@lua/os.lni index 6a4bcf0f..e3702667 100644 --- a/server/locale/zh-CN/libs/@lua/os.lni +++ b/server/locale/zh-CN/libs/@lua/os.lni @@ -16,6 +16,9 @@ description = '调用系统解释器执行 `command`。' [exit] description = '调用 ISO C 函数 `exit` 终止宿主程序。' +['exit Lua 5.1'] +description = '调用 C 函数 `exit` 终止宿主程序。' + [getenv] description = '返回进程环境变量 `varname` 的值。' diff --git a/server/locale/zh-CN/libs/@lua/string.lni b/server/locale/zh-CN/libs/@lua/string.lni index cc582783..6aa78cce 100644 --- a/server/locale/zh-CN/libs/@lua/string.lni +++ b/server/locale/zh-CN/libs/@lua/string.lni @@ -45,6 +45,9 @@ description = '返回以指定格式用 `string.pack` 打包的字符串的长 [rep] description = '返回 `n` 个字符串 `s` 以字符串 `sep` 为分割符连在一起的字符串。' +['rep Lua 5.1'] +description = '返回 `n` 个字符串 `s` 连在一起的字符串。' + [reverse] description = '返回字符串的翻转串。' |