diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-11 20:34:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-11 20:34:02 +0800 |
commit | 8f056d36ec61dd91cfab282780dc1786df646fcb (patch) | |
tree | e81ec976ad922c4bc74dedf29548f2a7c322f68e /script/core/diagnostics/undefined-global.lua | |
parent | 3820962ca2d23d525bc8417c8088e7eeb667cba1 (diff) | |
download | lua-language-server-8f056d36ec61dd91cfab282780dc1786df646fcb.zip |
Revert "resolve #1209"
This reverts commit 3820962ca2d23d525bc8417c8088e7eeb667cba1.
Diffstat (limited to 'script/core/diagnostics/undefined-global.lua')
-rw-r--r-- | script/core/diagnostics/undefined-global.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/core/diagnostics/undefined-global.lua b/script/core/diagnostics/undefined-global.lua index 179c9204..bf161c73 100644 --- a/script/core/diagnostics/undefined-global.lua +++ b/script/core/diagnostics/undefined-global.lua @@ -15,8 +15,8 @@ local requireLike = { ---@async return function (uri, callback) - local state = files.getState(uri) - if not state then + local ast = files.getState(uri) + if not ast then return end @@ -25,7 +25,7 @@ return function (uri, callback) local cache = {} -- 遍历全局变量,检查所有没有 set 模式的全局变量 - guide.eachSourceType(state.ast, 'getglobal', function (src) ---@async + guide.eachSourceType(ast.ast, 'getglobal', function (src) ---@async local key = src[1] if not key then return |