diff options
author | fesily <fesil@foxmail.com> | 2022-07-09 08:57:48 +0800 |
---|---|---|
committer | fesily <fesil@foxmail.com> | 2022-07-09 08:57:48 +0800 |
commit | 1d97909ac5517493eaa959178cd8a86db5dab1e7 (patch) | |
tree | 9a7d97b927fdfba2cb61e967e61e51349877ce07 | |
parent | fd6b84b1f1fb910cac55278973623c8bcde36485 (diff) | |
download | lua-language-server-1d97909ac5517493eaa959178cd8a86db5dab1e7.zip |
table new/clear function actual use scenarios
-rw-r--r-- | meta/template/table.clear.lua | 9 | ||||
-rw-r--r-- | meta/template/table.lua | 12 | ||||
-rw-r--r-- | meta/template/table.new.lua | 11 | ||||
-rw-r--r-- | script/proto/define.lua | 32 |
4 files changed, 37 insertions, 27 deletions
diff --git a/meta/template/table.clear.lua b/meta/template/table.clear.lua new file mode 100644 index 00000000..dffed5fa --- /dev/null +++ b/meta/template/table.clear.lua @@ -0,0 +1,9 @@ +---#if not JIT then DISABLE() end +---@meta + +---@version JIT +---#DES 'table.clear' +---@param tab table +local function clear(tab) end + +return clear
\ No newline at end of file diff --git a/meta/template/table.lua b/meta/template/table.lua index 1cb2f56f..2b62df71 100644 --- a/meta/template/table.lua +++ b/meta/template/table.lua @@ -92,16 +92,4 @@ function table.foreachi(list, callback) end ---@deprecated function table.getn(list) end ----@version JIT ----#DES 'table.new' ----@param narray integer ----@param nhash integer ----@return table -function table.new(narray, nhash) end - ----@version JIT ----#DES 'table.clear' ----@param tab table -function table.clear(tab) end - return table diff --git a/meta/template/table.new.lua b/meta/template/table.new.lua new file mode 100644 index 00000000..398bc9f9 --- /dev/null +++ b/meta/template/table.new.lua @@ -0,0 +1,11 @@ +---#if not JIT then DISABLE() end +---@meta + +---@version JIT +---#DES 'table.new' +---@param narray integer +---@param nhash integer +---@return table +local function new(narray, nhash) end + +return new
\ No newline at end of file diff --git a/script/proto/define.lua b/script/proto/define.lua index c73203f5..ecdaf306 100644 --- a/script/proto/define.lua +++ b/script/proto/define.lua @@ -165,21 +165,23 @@ m.TokenTypes = { } m.BuiltIn = { - ['basic'] = 'default', - ['bit'] = 'default', - ['bit32'] = 'default', - ['builtin'] = 'default', - ['coroutine'] = 'default', - ['debug'] = 'default', - ['ffi'] = 'default', - ['io'] = 'default', - ['jit'] = 'default', - ['math'] = 'default', - ['os'] = 'default', - ['package'] = 'default', - ['string'] = 'default', - ['table'] = 'default', - ['utf8'] = 'default', + ['basic'] = 'default', + ['bit'] = 'default', + ['bit32'] = 'default', + ['builtin'] = 'default', + ['coroutine'] = 'default', + ['debug'] = 'default', + ['ffi'] = 'default', + ['io'] = 'default', + ['jit'] = 'default', + ['math'] = 'default', + ['os'] = 'default', + ['package'] = 'default', + ['string'] = 'default', + ['table'] = 'default', + ['table.new'] = 'default', + ['table.clear'] = 'default', + ['utf8'] = 'default', } m.InlayHintKind = { |