diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-23 20:22:26 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-23 20:22:26 +0800 |
commit | 7fc2e8d182800a48e99744fc88fef24ca578b18f (patch) | |
tree | cd88b92bbc0bc50a55f0857db52b63dabdeb7e9a /script/core/diagnostics/count-down-loop.lua | |
parent | d2667b5943f41ec16b5e54a4d64c497bef149b59 (diff) | |
download | lua-language-server-7fc2e8d182800a48e99744fc88fef24ca578b18f.zip |
add integer
Diffstat (limited to 'script/core/diagnostics/count-down-loop.lua')
-rw-r--r-- | script/core/diagnostics/count-down-loop.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/core/diagnostics/count-down-loop.lua b/script/core/diagnostics/count-down-loop.lua index a16811ab..1a7dcf7d 100644 --- a/script/core/diagnostics/count-down-loop.lua +++ b/script/core/diagnostics/count-down-loop.lua @@ -13,11 +13,11 @@ return function (uri, callback) if not source.loc or not source.loc.value then return end - local maxNumer = source.max and source.max.type == 'number' and tonumber(source.max[1]) + local maxNumer = source.max and tonumber(source.max[1]) if maxNumer ~= 1 then return end - local minNumber = source.loc and source.loc.value and source.loc.value.type == 'number' and tonumber(source.loc.value[1]) + local minNumber = source.loc and source.loc.value and tonumber(source.loc.value[1]) if minNumber and minNumber <= 1 then return end @@ -28,7 +28,7 @@ return function (uri, callback) message = lang.script('DIAG_COUNT_DOWN_LOOP', ('%s, %s'):format(text:sub(source.loc.value.start, source.max.finish), '-1')) } else - local stepNumber = source.step.type == 'number' and tonumber(source.step[1]) + local stepNumber = tonumber(source.step[1]) if stepNumber and stepNumber > 0 then callback { start = source.loc.value.start, |