From 7575fe00aad91e0ba943e877ddcd838f76e095c0 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 26 Sep 2024 22:11:13 +0800 Subject: Fixed a few issues. * Fixed a `with` block with return statement issue. * Fixed a switch-when indentation issue. * Added error reporting for `return` statement not appearing in last block line. --- spec/outputs/syntax.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'spec/outputs/syntax.lua') diff --git a/spec/outputs/syntax.lua b/spec/outputs/syntax.lua index cfe63eb..5fd1821 100644 --- a/spec/outputs/syntax.lua +++ b/spec/outputs/syntax.lua @@ -40,12 +40,16 @@ end _ = function() return 1, 2, 34 end -return 5 + function() - return 4 + 2 +do + return 5 + function() + return 4 + 2 + end +end +do + return 5 + (function() + return 4 + end) + 2 end -return 5 + (function() - return 4 -end) + 2 print(5 + function() _ = 34 return good(nads) -- cgit v1.2.3-55-g6feb