diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-23 11:59:52 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-23 11:59:52 +0800 |
commit | 86d6ea6811d2fe6d55351a4b98c5227214e74cad (patch) | |
tree | 4623b4b7ae360d959a866e4aef627e3b22827631 /server/src | |
parent | 7e816a0cdd2c88361b25980b0890b8ac8da16ab7 (diff) | |
download | lua-language-server-86d6ea6811d2fe6d55351a4b98c5227214e74cad.zip |
空while是合法的
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/core/diagnostics.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua index 9f46d724..5dfdd196 100644 --- a/server/src/core/diagnostics.lua +++ b/server/src/core/diagnostics.lua @@ -324,7 +324,7 @@ end function mt:searchEmptyBlock(callback) self.vm:eachSource(function (source) - -- 认为空repeat是合法的 + -- 认为空repeat与空while是合法的 -- 要去vm中激活source if source.type == 'if' then for _, block in ipairs(source) do @@ -337,7 +337,6 @@ function mt:searchEmptyBlock(callback) end if source.type == 'loop' or source.type == 'in' - or source.type == 'while' then if #source == 0 then callback(source.start, source.finish) |