diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-17 11:14:58 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-17 11:14:58 +0800 |
commit | d3e25094e63318676ae198ce259fad73a68c21c8 (patch) | |
tree | 2dcb48e284fe5238a7326cc37d1e45f741413ba4 /server | |
parent | efb3eb051129c8522b516fbc913e81bfd1ef2f92 (diff) | |
download | lua-language-server-d3e25094e63318676ae198ce259fad73a68c21c8.zip |
更新库
Diffstat (limited to 'server')
-rw-r--r-- | server/libs/lua53/file.lni | 145 | ||||
-rw-r--r-- | server/libs/lua53/io.lni | 188 |
2 files changed, 324 insertions, 9 deletions
diff --git a/server/libs/lua53/file.lni b/server/libs/lua53/file.lni new file mode 100644 index 00000000..29d4a950 --- /dev/null +++ b/server/libs/lua53/file.lni @@ -0,0 +1,145 @@ + +<default> +type = 'function' +[[.parent]] +type = 'object' +name = 'FILE*' + +[close] +[[.returns]] +name = 'suc' +type = 'boolean' +default = 'true' +optional = 'after' +[[.returns]] +name = 'type' +type = 'string' +[[.returns]] +name = 'code' +[[.enums]] +type = 'type' +enum = 'exit' +[[.enums]] +type = 'type' +enum = 'signal' + +[flush] + +[lines] +[[.args]] +name = 'mode' +type = '...' +default = 'l' +[[.returns]] +type = 'function' +returns = { + 1 = { + name = 'c', + type = {'string', 'number'}, + } +} +[[.enums]] +name = 'mode' +enum = 'n' +[[.enums]] +name = 'mode' +enum = 'n' +[[.enums]] +name = 'mode' +enum = 'i' +[[.enums]] +name = 'mode' +enum = 'a' +[[.enums]] +name = 'mode' +enum = 'l' +[[.enums]] +name = 'mode' +enum = 'L' +[[.enums]] +name = 'mode' +code = 'number' + +[read] +[[.args]] +name = 'mode' +type = '...' +default = 'l' +[[.returns]] +type = {'string', 'number'} +[[.enums]] +name = 'mode' +enum = 'n' +[[.enums]] +name = 'mode' +enum = 'n' +[[.enums]] +name = 'mode' +enum = 'i' +[[.enums]] +name = 'mode' +enum = 'a' +[[.enums]] +name = 'mode' +enum = 'l' +[[.enums]] +name = 'mode' +enum = 'L' +[[.enums]] +name = 'mode' +code = 'number' + +[seek] +[[.args]] +name = 'whence' +type = 'string' +default = 'cur' +optional = 'after' +[[.args]] +name = 'offset' +type = 'integer' +default = 0 +optional = 'self' +[[.returns]] +name = 'offset' +type = 'integer' +[[.returns]] +name = 'errmsg' +type = 'string' +optional = 'self' +[[.enums]] +name = 'whence' +enum = 'set' +[[.enums]] +name = 'whence' +enum = 'cur' +[[.enums]] +name = 'whence' +enum = 'end' + +[setvbuf] +[[.args]] +name = 'mode' +type = 'string' +[[.args]] +name = 'size' +type = 'integer' +[[.enums]] +name = 'mode' +enum = 'no' +[[.enums]] +name = 'mode' +enum = 'full' +[[.enums]] +name = 'mode' +enum = 'line' + +[write] +[[.args]] +type = '...' +[[.returns]] +type = 'FILE*' +[[.returns]] +name = 'errmsg' +type = 'string' +optional = 'self' diff --git a/server/libs/lua53/io.lni b/server/libs/lua53/io.lni index e49993bb..a5325cd4 100644 --- a/server/libs/lua53/io.lni +++ b/server/libs/lua53/io.lni @@ -18,17 +18,187 @@ name = 'io' [stdin] type = 'FILE*' +[stdout] +type = 'FILE*' + +[stderr] +type = 'FILE*' + [close] -[[.parent]] -type = 'global' -name = 'table' -[[.parent]] -type = 'library' -name = 'table' -[[.parent]] -type = 'object' -name = 'FILE*' [[.args]] +name = 'file' type = 'FILE*' +optional = 'self' +[[.returns]] +name = 'suc' +type = 'boolean' +default = 'true' +optional = 'after' +[[.returns]] +name = 'type' +type = 'string' +[[.returns]] +name = 'code' +[[.enums]] +type = 'type' +enum = 'exit' +[[.enums]] +type = 'type' +enum = 'signal' + +[flush] + +[input] +[[.args]] name = 'file' +type = {'string', 'FILE*'} +optional = 'self' +[[.returns]] +type = 'FILE*' + +[lines] +[[.args]] +name = 'filename' +type = 'string' +optional = 'after' +[[.args]] +name = 'mode' +type = '...' +default = 'l' +[[.returns]] +type = 'function' +returns = { + 1 = { + name = 'c', + type = {'string', 'number'}, + } +} +[[.enums]] +name = 'mode' +enum = 'n' +[[.enums]] +name = 'mode' +enum = 'n' +[[.enums]] +name = 'mode' +enum = 'i' +[[.enums]] +name = 'mode' +enum = 'a' +[[.enums]] +name = 'mode' +enum = 'l' +[[.enums]] +name = 'mode' +enum = 'L' +[[.enums]] +name = 'mode' +code = 'number' + +[open] +[[.args]] +name = 'filename' +type = 'string' +[[.args]] +name = 'mode' +type = 'string' +optional = 'self' +default = 'r' +[[.returns]] +type = 'FILE*' +[[.enums]] +name = 'mode' +enum = 'r' +[[.enums]] +name = 'mode' +enum = 'w' +[[.enums]] +name = 'mode' +enum = 'a' +[[.enums]] +name = 'mode' +enum = 'r+' +[[.enums]] +name = 'mode' +enum = 'w+' +[[.enums]] +name = 'mode' +enum = 'a+' + +[output:input] + +[popen] +[[.args]] +name = 'prog' +type = 'string' +[[.args]] +name = 'mode' +type = 'string' +optional = 'self' +default = 'r' +[[.enums]] +name = 'mode' +enum = 'r' +[[.enums]] +name = 'mode' +enum = 'w' + +[read] +[[.args]] +name = 'mode' +type = '...' +default = 'l' +[[.returns]] +type = {'string', 'number'} +[[.enums]] +name = 'mode' +enum = 'n' +[[.enums]] +name = 'mode' +enum = 'n' +[[.enums]] +name = 'mode' +enum = 'i' +[[.enums]] +name = 'mode' +enum = 'a' +[[.enums]] +name = 'mode' +enum = 'l' +[[.enums]] +name = 'mode' +enum = 'L' +[[.enums]] +name = 'mode' +code = 'number' + +[tmpfile] +[[.returns]] +type = 'FILE*' + +[type] +[[.args]] +name = 'obj' +type = 'FILE*' +[[.returns]] +name = 'type' +type = 'string' +[[.enums]] +name = 'type' +enum = 'file' +[[.enums]] +name = 'type' +enum = 'closed file' +[[.enums]] +name = 'type' +code = 'nil' + +[write] +[[.args]] +type = '...' +[[.returns]] +type = 'FILE*' +[[.returns]] +name = 'errmsg' +type = 'string' optional = 'self' |