summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/libs/lua53/basic.lni54
-rw-r--r--server/src/matcher/vm.lua2
2 files changed, 52 insertions, 4 deletions
diff --git a/server/libs/lua53/basic.lni b/server/libs/lua53/basic.lni
index 3cd943f3..09092026 100644
--- a/server/libs/lua53/basic.lni
+++ b/server/libs/lua53/basic.lni
@@ -125,8 +125,44 @@ name = 'mode'
enum = 'bt'
[loadfile]
+[[.args]]
+name = 'filename'
+type = 'string'
+optional = 'after'
+[[.args]]
+name = 'mode'
+type = 'string'
+optional = 'after'
+[[.args]]
+name = 'env'
+type = 'table'
+optional = 'self'
+[[.returns]]
+type = 'function'
+[[.returns]]
+name = 'error_message'
+type = 'string'
+[[.enums]]
+name = 'mode'
+enum = 'b'
+[[.enums]]
+name = 'mode'
+enum = 't'
+[[.enums]]
+name = 'mode'
+enum = 'bt'
[next]
+[[.args]]
+name = 'table'
+type = 'table'
+[[.args]]
+name = 'index'
+optional = 'self'
+[[.returns]]
+name = 'key'
+[[.returns]]
+name = 'value'
[pairs]
[[.args]]
@@ -140,17 +176,31 @@ returns = {
name = 'key',
},
2 = {
- name = 'object',
+ name = 'value',
},
}
[[.returns]]
name = 't'
type = 'table'
[[.returns]]
-name = 'nil'
type = 'nil'
[pcall]
+[[.args]]
+name = 'f'
+type = 'function'
+[[.args]]
+name = 'arg1'
+optional = 'after'
+[[.args]]
+type = '...'
+[[.returns]]
+name = 'success'
+type = 'boolean'
+[[.returns]]
+name = 'result'
+[[.returns]]
+type = '...'
[print]
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua
index 0700f640..b1d303a9 100644
--- a/server/src/matcher/vm.lua
+++ b/server/src/matcher/vm.lua
@@ -445,7 +445,6 @@ function mt:setFunctionReturn(func, index, value)
if not func.returns then
func.returns = {
type = 'list',
- [1] = self:createValue('any'),
}
end
if value then
@@ -465,7 +464,6 @@ function mt:getFunctionReturns(func, i)
if not func.returns then
func.returns = {
type = 'list',
- [1] = self:createValue('any'),
}
end
if i then