diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-07-21 22:16:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-07-21 22:16:18 +0800 |
commit | 050b7262a4019a1ecafac0acdc5bd9a1b0ca0bf4 (patch) | |
tree | 508723afe0c2d322582cf8116b21e3625e9f681d /script-beta/parser | |
parent | de8ca882f4b50b667c6f4c647d26937a869f8546 (diff) | |
download | lua-language-server-050b7262a4019a1ecafac0acdc5bd9a1b0ca0bf4.zip |
支持单对象跨文件
Diffstat (limited to 'script-beta/parser')
-rw-r--r-- | script-beta/parser/guide.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index 22e49c90..5eff3e1d 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -936,6 +936,19 @@ function m.getCallAndArgIndex(callarg) return call, index end +-- 根据函数调用的返回值,获取:调用的函数,参数列表,自己是第几个返回值 +function m.getCallValue(source) + local value = source.value + if not value or value.type ~= 'select' then + return + end + local call = value.vararg + if call.type ~= 'call' then + return + end + return call.node, call.args, value.index +end + function m.getNextRef(ref) local nextRef = ref.next if nextRef then |