diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-24 22:22:53 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-24 22:22:53 +0800 |
commit | 1d7773f05477ca3f637fa8afe05658868bf38a26 (patch) | |
tree | f5379edac4f7c4473e5f8b5eb2fec9a725ae3b9e /script/vm/node.lua | |
parent | 01a4bfa62d3583ade899e69a92c290ee57fb9251 (diff) | |
download | lua-language-server-1d7773f05477ca3f637fa8afe05658868bf38a26.zip |
cleanup
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r-- | script/vm/node.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua index d3e407b6..3d1a24bc 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -47,6 +47,14 @@ function mt:isEmpty() return #self == 0 end +function mt:clear() + self.optional = nil + for i, c in ipairs(self) do + self[i] = nil + self[c] = nil + end +end + ---@param n integer ---@return vm.object? function mt:get(n) |