summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-23 11:59:52 +0800
committersumneko <sumneko@hotmail.com>2019-04-23 11:59:52 +0800
commit86d6ea6811d2fe6d55351a4b98c5227214e74cad (patch)
tree4623b4b7ae360d959a866e4aef627e3b22827631 /server/src
parent7e816a0cdd2c88361b25980b0890b8ac8da16ab7 (diff)
downloadlua-language-server-86d6ea6811d2fe6d55351a4b98c5227214e74cad.zip
空while是合法的
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/diagnostics.lua3
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)