summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-06 01:02:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-06 01:02:27 +0800
commitbf3f97e05082f2a529621a70c3fde516513076b1 (patch)
treec4e0921e762b8403dc33d79060c5658b4aed3dc7
parent21d1b8fd59bcfff3797453e787a1151f8987ae0b (diff)
downloadlua-language-server-bf3f97e05082f2a529621a70c3fde516513076b1.zip
update
m---------3rd/rcedit0
-rw-r--r--script/vm/compiler.lua14
2 files changed, 8 insertions, 6 deletions
diff --git a/3rd/rcedit b/3rd/rcedit
new file mode 160000
+Subproject b807b34a644c86c0b0d89c7f073967e79202731
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index bfed8ffb..61a6076f 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -496,13 +496,15 @@ local function setCallArgNode(source, call, callNode, fixIndex)
end
end
- local eventIndex = 1
- local eventArg = call.args[eventIndex + fixIndex]
- if eventArg and eventArg.dummy then
- eventIndex = 2
- eventArg = call.args[eventIndex + fixIndex]
+ local eventIndex, eventMap
+ for i = 1, 2 do
+ local eventArg = call.args[i + fixIndex]
+ eventMap = valueMgr.getLiterals(eventArg)
+ if eventMap then
+ eventIndex = i
+ break
+ end
end
- local eventMap = valueMgr.getLiterals(eventArg)
for n in nodeMgr.eachNode(callNode) do
if n.type == 'function' then