diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-10 17:12:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-10 17:12:49 +0800 |
commit | 2178706a33e6f15a8cea567c352d9a567c38abb9 (patch) | |
tree | 36bad9d0e3f3ff6feb03ca2266060dcd89f94b1e /script/vm/node.lua | |
parent | 75df2fd38fe75e951ea80b5f1abae8772437ae04 (diff) | |
download | lua-language-server-2178706a33e6f15a8cea567c352d9a567c38abb9.zip |
update
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r-- | script/vm/node.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua index f9dbdf3e..a3cfb819 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -38,6 +38,15 @@ function m.setNode(source, node) m.nodeCache[source] = m.mergeNode(me, node) end +---@param node vm.node +---@return vm.node.union +function m.setFalsy(node) + if node.type ~= 'union' then + node = union(node) + end + return node +end + ---@return fun():vm.node function m.eachNode(node) if not node then |