diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-10 11:39:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-10 11:39:02 +0800 |
commit | 680d5e7e34290d978abe1cba1c43b5321e5f5e79 (patch) | |
tree | 087dd2a2031b14c497c2e781baee4e59436fb1b2 /script-beta/core/hover/arg.lua | |
parent | 6c6ac3ba0f454b64bb74cebd11252cac828ff854 (diff) | |
download | lua-language-server-680d5e7e34290d978abe1cba1c43b5321e5f5e79.zip |
库函数
Diffstat (limited to 'script-beta/core/hover/arg.lua')
-rw-r--r-- | script-beta/core/hover/arg.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/script-beta/core/hover/arg.lua b/script-beta/core/hover/arg.lua index 268ceecf..983cc84e 100644 --- a/script-beta/core/hover/arg.lua +++ b/script-beta/core/hover/arg.lua @@ -20,10 +20,12 @@ local function asFunction(source, caller) if parent and parent.type == 'setmethod' then methodDef = true end - if caller.type == 'method' - or caller.type == 'getmethod' - or caller.type == 'setmethod' then - methodCall = true + if caller then + if caller.type == 'method' + or caller.type == 'getmethod' + or caller.type == 'setmethod' then + methodCall = true + end end if not methodDef and methodCall then return table.concat(args, ', ', 2) |