diff options
author | Connor Bren <wildweegee101@gmail.com> | 2024-08-29 21:49:38 -0600 |
---|---|---|
committer | Connor Bren <wildweegee101@gmail.com> | 2024-08-29 21:49:38 -0600 |
commit | b871eb6fa4dfa2edc01ba871b3890bfa01206a93 (patch) | |
tree | 406988777a64c1bc58a415dae0686ccc4b4b2575 /script/vm/compiler.lua | |
parent | eb0bf985b4b22e529cfb75b88d7e8c6814acacea (diff) | |
download | lua-language-server-b871eb6fa4dfa2edc01ba871b3890bfa01206a93.zip |
fix VM plugins
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r-- | script/vm/compiler.lua | 15 |
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 |