diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-08 15:07:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-08 15:07:50 +0800 |
commit | 083656e8a1e558b5898915925d910ad035e8f615 (patch) | |
tree | 5b2d0795aa304386dc3df426d56817907d056f1e /script/core/noder.lua | |
parent | 8cc8789fbff920f631859e8f9eba75e2448aa8c1 (diff) | |
download | lua-language-server-083656e8a1e558b5898915925d910ad035e8f615.zip |
update
Diffstat (limited to 'script/core/noder.lua')
-rw-r--r-- | script/core/noder.lua | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua index 844f6c77..68783545 100644 --- a/script/core/noder.lua +++ b/script/core/noder.lua @@ -41,25 +41,6 @@ local function getNode(noders, id) return noders[id] end ----是否是全局变量(包括 _G.XXX 形式) ----@param source parser.guide.object ----@return boolean -local function isGlobal(source) - if source.type == 'setglobal' - or source.type == 'getglobal' then - if source.node and source.node.tag == '_ENV' then - return true - end - end - if source.type == 'field' then - source = source.parent - end - if source.special == '_G' then - return true - end - return false -end - ---获取语法树单元的key ---@param source parser.guide.object ---@return string? key @@ -266,7 +247,7 @@ local function checkMode(source) end return id end - if isGlobal(source) then + if guide.isGlobal(source) then return 'g:' end return 'l:' @@ -865,13 +846,6 @@ function m.getUriAndID(id) return uri, newID end ----是否是全局变量(包括 _G.XXX 形式) ----@param source parser.guide.object ----@return boolean -function m.isGlobal(source) - return isGlobal(source) -end - ---获取source的ID ---@param source parser.guide.object ---@return string |