From 0ccf4408271c8a0d147e3cf25689810862e8c1db Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 24 Feb 2026 12:24:10 +0800 Subject: Cleaned up and fixed more comment reserving codes. --- spec/outputs/switch.lua | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'spec/outputs/switch.lua') diff --git a/spec/outputs/switch.lua b/spec/outputs/switch.lua index 7c1004b..fb674e9 100644 --- a/spec/outputs/switch.lua +++ b/spec/outputs/switch.lua @@ -777,4 +777,48 @@ do "view" }) end +do + local _check_cond_expr + _check_cond_expr = function(iftyp, n, args) + local sw = { + ct = iftyp, + op = op + } + local why + local _type_0 = type(sw) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 + local _match_0 = false + if _tab_0 then + if 'if' == sw.ct and '==' == sw.op then + _match_0 = true + why = 'never' + end + end + if not _match_0 then + local _match_1 = false + if _tab_0 then + if 'if' == sw.ct and '!=' == sw.op then + _match_1 = true + why = 'always' + end + end + if not _match_1 then + local _match_2 = false + if _tab_0 then + if 'unless' == sw.ct and '==' == sw.op then + _match_2 = true + why = 'always' + end + end + if not _match_2 then + if _tab_0 then + if 'unless' == sw.ct and '!=' == sw.op then + why = 'never' + end + end + end + end + end + end +end return nil -- cgit v1.2.3-55-g6feb