From cf0a0f37bf07eb8e9435febe96e3adfe45004f91 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 23 May 2025 12:22:21 +0800 Subject: Added break with value to with syntax. --- spec/outputs/with.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'spec/outputs/with.lua') diff --git a/spec/outputs/with.lua b/spec/outputs/with.lua index 1a795c1..20c5d44 100644 --- a/spec/outputs/with.lua +++ b/spec/outputs/with.lua @@ -187,4 +187,31 @@ do return _with_0[123] end end +do + f((function() + local _with_0 = item + do + local _accum_0 + while true do + if _with_0.id > 0 then + _accum_0 = _with_0.content + break + end + end + _with_0 = _accum_0 + end + return _with_0 + end)()) + local a + local _with_0 = tb + local _accum_0 + while true do + if _with_0.v then + _accum_0 = _with_0.a + break + end + end + _with_0 = _accum_0 + a = _with_0 +end return nil -- cgit v1.2.3-55-g6feb