diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-28 16:43:27 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-28 16:43:27 +0800 |
commit | 05555beda5b14005c61602dc400241d5c62805c4 (patch) | |
tree | 4bddcd4097a12d49ec005f2b93b3cc744f8b212a /script | |
parent | 1d257a7c89e6077dccf5ed9f539ec140a802e4d5 (diff) | |
download | lua-language-server-05555beda5b14005c61602dc400241d5c62805c4.zip |
stash
Diffstat (limited to 'script')
-rw-r--r-- | script/core/noder.lua | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua index 4318d10c..bd8aaf84 100644 --- a/script/core/noder.lua +++ b/script/core/noder.lua @@ -1009,12 +1009,15 @@ compileNodeMap = util.switch() end if source.bindSources then for _, src in ipairs(source.bindSources) do - local paramID = sformat('%s%s%s' - , getID(src) - , PARAM_NAME - , source.param[1] - ) - pushForward(noders, paramID, id) + if src.type == 'function' + or guide.isSet(src) then + local paramID = sformat('%s%s%s' + , getID(src) + , PARAM_NAME + , source.param[1] + ) + pushForward(noders, paramID, id) + end end end end) @@ -1174,6 +1177,9 @@ compileNodeMap = util.switch() end if source.args then for i, arg in ipairs(source.args) do + if arg[1] == 'self' then + goto CONTINUE + end local indexID = sformat('%s%s%s' , id , PARAM_INDEX @@ -1193,6 +1199,7 @@ compileNodeMap = util.switch() , '...' )) end + ::CONTINUE:: end end -- 检查实体返回值 @@ -1305,14 +1312,17 @@ compileNodeMap = util.switch() end for _, rtn in ipairs(source.returns) do for _, src in ipairs(source.bindSources) do - local fullID = sformat('%s%s%s' - , getID(src) - , RETURN_INDEX - , rtn.returnIndex - ) - pushForward(noders, fullID, getID(rtn)) - for _, typeUnit in ipairs(rtn.types) do - pushBackward(noders, getID(typeUnit), fullID, INFO_DEEP_AND_DONT_CROSS) + if src.type == 'function' + or guide.isSet(src) then + local fullID = sformat('%s%s%s' + , getID(src) + , RETURN_INDEX + , rtn.returnIndex + ) + pushForward(noders, fullID, getID(rtn)) + for _, typeUnit in ipairs(rtn.types) do + pushBackward(noders, getID(typeUnit), fullID, INFO_DEEP_AND_DONT_CROSS) + end end end end |