diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-09-16 17:58:42 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-09-16 17:58:42 +0800 |
commit | 8398aa93fc8e92eda1ee259ebe256d8eda820e09 (patch) | |
tree | 6d637b85af910e35ec077ff2aad4e86551696c47 /script-beta | |
parent | f0e3b9d18c95af0f5f8581bbc0ab46bd882337d4 (diff) | |
download | lua-language-server-8398aa93fc8e92eda1ee259ebe256d8eda820e09.zip |
修正一些bug
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/parser/guide.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index d9254c7d..6d580b65 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -2742,7 +2742,11 @@ end function m.inferByCallReturn(status, source) if source.type ~= 'select' then - return + if source.value and source.value.type == 'select' then + source = source.value + else + return + end end if not source.vararg or source.vararg.type ~= 'call' then return @@ -2752,7 +2756,11 @@ end function m.inferByPCallReturn(status, source) if source.type ~= 'select' then - return + if source.value and source.value.type == 'select' then + source = source.value + else + return + end end local call = source.vararg if not call or call.type ~= 'call' then @@ -2805,6 +2813,9 @@ function m.searchInfer(status, obj) obj = obj.exp end obj = m.getObjectValue(obj) or obj + if obj.type == 'select' then + obj = obj.parent + end local cache, makeCache if status.interface.cache then |