summaryrefslogtreecommitdiff
path: root/script-beta/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-12 14:40:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-12 14:40:53 +0800
commitcda68f9f113f4355ac040a103b3e62132724ded3 (patch)
tree2c94c8571296b412077003fed1a9ef28773fd422 /script-beta/vm
parent5b04bbf5d9b1b474acfaf447421374d3b107b04a (diff)
downloadlua-language-server-cda68f9f113f4355ac040a103b3e62132724ded3.zip
自动完成支持object
Diffstat (limited to 'script-beta/vm')
-rw-r--r--script-beta/vm/eachField.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/script-beta/vm/eachField.lua b/script-beta/vm/eachField.lua
index d6ef315b..b60a882a 100644
--- a/script-beta/vm/eachField.lua
+++ b/script-beta/vm/eachField.lua
@@ -148,6 +148,16 @@ local function eachField(source, callback)
elseif src.type == 'table' then
ofTabel(src, callback)
end
+ local lib = library.object[src.type]
+ if lib then
+ for k, v in pairs(lib.child) do
+ callback {
+ source = v,
+ key = 's|' .. k,
+ mode = 'value',
+ }
+ end
+ end
end)
end