summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
authorConnor Bren <wildweegee101@gmail.com>2024-08-29 21:49:38 -0600
committerConnor Bren <wildweegee101@gmail.com>2024-08-29 21:49:38 -0600
commitb871eb6fa4dfa2edc01ba871b3890bfa01206a93 (patch)
tree406988777a64c1bc58a415dae0686ccc4b4b2575 /script/vm/compiler.lua
parenteb0bf985b4b22e529cfb75b88d7e8c6814acacea (diff)
downloadlua-language-server-b871eb6fa4dfa2edc01ba871b3890bfa01206a93.zip
fix VM plugins
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r--script/vm/compiler.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 5f3317b9..deab2033 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1385,10 +1385,17 @@ local function compileLocal(source)
end
if source.parent.type == 'funcargs' and not hasMarkDoc and not hasMarkParam then
local func = source.parent.parent
- local vmPlugin = plugin.getVmPlugin(guide.getUri(source))
- local hasDocArg = vmPlugin and vmPlugin.OnCompileFunctionParam(compileFunctionParam, func, source)
- or compileFunctionParam(func, source)
- if not hasDocArg then
+ local interfaces = plugin.getPluginInterfaces(guide.getUri(source))
+ local hasDocArg = false
+ if interfaces then
+ for _, interface in ipairs(interfaces) do
+ if interface.VM then
+ hasDocArg = interface.VM.OnCompileFunctionParam(compileFunctionParam, func, source)
+ if hasDocArg then break end
+ end
+ end
+ end
+ if not hasDocArg and not compileFunctionParam(func, source) then
vm.setNode(source, vm.declareGlobal('type', 'any'))
end
end