diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-24 19:57:37 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-24 19:57:37 +0800 |
commit | bc0270a06a1017301ca96712b350c399537e63a6 (patch) | |
tree | 968c8c12d95f5b123d802a1dfc02b6befab9c1b0 /script/vm | |
parent | 2a3f40432c1e6de9f40e9fd9c222a95fa7ad4317 (diff) | |
download | lua-language-server-bc0270a06a1017301ca96712b350c399537e63a6.zip |
cleanup
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/getDocs.lua | 4 | ||||
-rw-r--r-- | script/vm/getGlobals.lua | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/script/vm/getDocs.lua b/script/vm/getDocs.lua index 533cd78d..79e60fed 100644 --- a/script/vm/getDocs.lua +++ b/script/vm/getDocs.lua @@ -19,12 +19,12 @@ function vm.getDocDefines(name) local results = {} local id = 'def:dn:' .. name for node in collector.each(id) do - noder.eachSource(node, function (source) + for source in noder.eachSource(node) do if source.type == 'doc.class.name' or source.type == 'doc.alias.name' then results[#results+1] = source end - end) + end end cache[name] = results return results diff --git a/script/vm/getGlobals.lua b/script/vm/getGlobals.lua index f32a84b1..696f218e 100644 --- a/script/vm/getGlobals.lua +++ b/script/vm/getGlobals.lua @@ -22,9 +22,9 @@ function vm.getGlobalSets(name) id = ('def:g:%q'):format(name) end for node in collector.each(id) do - noder.eachSource(node, function (source) + for source in noder.eachSource(node) do results[#results+1] = source - end) + end end return results end |