diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-07-17 16:34:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-07-17 16:34:38 +0800 |
commit | fde2dc4cdb275aeb550c7d0af96875d4c7c2affb (patch) | |
tree | 035503c333402ab35a111440a50c5a30ec2da546 | |
parent | b5f3260339434e6fce3b792c741c67ea5177c868 (diff) | |
download | lua-language-server-fde2dc4cdb275aeb550c7d0af96875d4c7c2affb.zip |
只检查fori形式的控制变量修改
-rw-r--r-- | script/core/diagnostics.lua | 6 | ||||
-rw-r--r-- | test/diagnostics/normal.lua | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/script/core/diagnostics.lua b/script/core/diagnostics.lua index f488dba5..0ec98954 100644 --- a/script/core/diagnostics.lua +++ b/script/core/diagnostics.lua @@ -861,9 +861,9 @@ function mt:searchSetForState(callback) if source.type == 'loop' then locs[#locs+1] = source.arg:bindLocal() elseif source.type == 'in' then - self.vm:forList(source.arg, function (arg) - locs[#locs+1] = arg:bindLocal() - end) + --self.vm:forList(source.arg, function (arg) + -- locs[#locs+1] = arg:bindLocal() + --end) end end) for i = 1, #locs do diff --git a/test/diagnostics/normal.lua b/test/diagnostics/normal.lua index 915e445f..5b0e64a5 100644 --- a/test/diagnostics/normal.lua +++ b/test/diagnostics/normal.lua @@ -530,13 +530,13 @@ t.a = 1 t.a = 2 ]] -TEST [[ -for k, v in pairs {1, 2, 3, 4 ,5} do - print(k, v) - <!k!> = 1 - print(v) -end -]] +--TEST [[ +--for k, v in pairs {1, 2, 3, 4 ,5} do +-- print(k, v) +-- <!k!> = 1 +-- print(v) +--end +--]] TEST [[ for i = 1, 10 do |