diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-06 01:02:27 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-06 01:02:27 +0800 |
commit | bf3f97e05082f2a529621a70c3fde516513076b1 (patch) | |
tree | c4e0921e762b8403dc33d79060c5658b4aed3dc7 /script/vm | |
parent | 21d1b8fd59bcfff3797453e787a1151f8987ae0b (diff) | |
download | lua-language-server-bf3f97e05082f2a529621a70c3fde516513076b1.zip |
update
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/compiler.lua | 14 |
1 files changed, 8 insertions, 6 deletions
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 |