From 4a3cc26c6dfd74e61c8b6480038d6a292ea86e47 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 21 Mar 2024 09:14:34 +0800 Subject: remove redundant 'do' blocks in code generation. --- spec/outputs/test/format_spec.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'spec/outputs/test') diff --git a/spec/outputs/test/format_spec.lua b/spec/outputs/test/format_spec.lua index 33a85f2..ed0fbee 100644 --- a/spec/outputs/test/format_spec.lua +++ b/spec/outputs/test/format_spec.lua @@ -101,16 +101,14 @@ rewriteLineCol = function(item) item[2] = 0 item[3] = 0 for i = 4, #item do - do - local _exp_0 = type(item[i]) - if "table" == _exp_0 then - if item[i][1] == "comment" then - table.remove(item, i) - rewriteLineCol(item) - return - end - rewriteLineCol(item[i]) + local _exp_0 = type(item[i]) + if "table" == _exp_0 then + if item[i][1] == "comment" then + table.remove(item, i) + rewriteLineCol(item) + return end + rewriteLineCol(item[i]) end end end -- cgit v1.2.3-55-g6feb