diff options
Diffstat (limited to 'script/vm/infer.lua')
-rw-r--r-- | script/vm/infer.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/script/vm/infer.lua b/script/vm/infer.lua index 5ac7d73b..6457696a 100644 --- a/script/vm/infer.lua +++ b/script/vm/infer.lua @@ -17,7 +17,7 @@ local inferSorted = { ['nil'] = 100, } -local viewNodeMap = util.switch() +local viewNodeSwitch = util.switch() : case 'nil' : case 'boolean' : case 'string' @@ -112,14 +112,11 @@ local viewNodeMap = util.switch() end return ('fun(%s)%s'):format(argView, regView) end) - : getMap() ---@param node vm.node ---@return string? local function viewNode(node, options) - if viewNodeMap[node.type] then - return viewNodeMap[node.type](node, options) - end + return viewNodeSwitch(node.type, node, options) end local function eraseAlias(node, viewMap, options) |