diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-02 20:51:42 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-02 20:51:42 +0800 |
commit | d2555c83e1e4338f52a740cbd163fed043219888 (patch) | |
tree | 1fa03cf6ae92594d2fbb7cf9ce11ad2e40612da8 /test-beta/diagnostics/init.lua | |
parent | ededf909f340f582195ba2f88b85787fa3142be1 (diff) | |
download | lua-language-server-d2555c83e1e4338f52a740cbd163fed043219888.zip |
分步给出诊断结果
Diffstat (limited to 'test-beta/diagnostics/init.lua')
-rw-r--r-- | test-beta/diagnostics/init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test-beta/diagnostics/init.lua b/test-beta/diagnostics/init.lua index b1801083..3c2790ab 100644 --- a/test-beta/diagnostics/init.lua +++ b/test-beta/diagnostics/init.lua @@ -50,7 +50,12 @@ function TEST(script, ...) files.removeAll() local new_script, target = catch_target(script, ...) files.setText('', new_script) - local datas = core('') or {} + local datas = {} + core('', function (results) + for _, res in ipairs(results) do + datas[#datas+1] = res + end + end) local results = {} for i, data in ipairs(datas) do results[i] = { data.start, data.finish } |