diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-08 19:41:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-08 19:41:06 +0800 |
commit | 256b37771a9203ab0c27d5690e35d9a1f9185465 (patch) | |
tree | ffe9fda7167f17099dd3bdcfa27ec5c4e51dadca /script/vm/node.lua | |
parent | dd7317a907b88cb102f45535ef19d67b47564c7f (diff) | |
download | lua-language-server-256b37771a9203ab0c27d5690e35d9a1f9185465.zip |
update
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r-- | script/vm/node.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua index a8a900ec..f9dbdf3e 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -5,6 +5,8 @@ local union = require 'vm.union' ---@class vm.node-manager local m = {} +local DUMMY_FUNCTION = function () end + ---@type table<parser.object, vm.node> m.nodeCache = {} @@ -38,6 +40,9 @@ end ---@return fun():vm.node function m.eachNode(node) + if not node then + return DUMMY_FUNCTION + end if node.type == 'union' then return node:eachNode() end |