summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-14 23:38:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-14 23:38:13 +0800
commitcf3d5108c52e9194ed9fff1a54569edb7bd6ee1a (patch)
tree430271719be98ed76b3c2a98117fac2c57cb6844 /script
parentbf334a76c7ebff9da14292061a8f4a904ff38465 (diff)
downloadlua-language-server-cf3d5108c52e9194ed9fff1a54569edb7bd6ee1a.zip
#1050
class -> local/global -> .value
Diffstat (limited to 'script')
-rw-r--r--script/vm/compiler.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 05057e68..708b4e12 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -214,6 +214,16 @@ function vm.getClassFields(suri, node, key, pushResult)
pushResult(field)
end
end)
+ if src.value and src.value.type == 'table' then
+ searchFieldSwitch('table', suri, src.value, key, function (field)
+ local fieldKey = guide.getKeyName(field)
+ if not searchedFields[fieldKey]
+ and guide.isSet(field) then
+ hasFounded[fieldKey] = true
+ pushResult(field)
+ end
+ end)
+ end
end
end
-- look into extends(if field not found)