From e4f8d1b3b075323968bb6dc334226dff33c0a2b0 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 3 Feb 2026 22:42:37 +0800 Subject: Updated doc. --- spec/outputs/codes_from_doc_zh.lua | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'spec/outputs/codes_from_doc_zh.lua') diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua index 89335c9..2aa354e 100644 --- a/spec/outputs/codes_from_doc_zh.lua +++ b/spec/outputs/codes_from_doc_zh.lua @@ -107,7 +107,7 @@ if cond then end end print("yuescript") -print(3) +print(2) print("有效的枚举类型:", "Static") do print(123, "hello") @@ -986,6 +986,36 @@ local arg1 = { a = 0 } f2(arg1, arg2) +local findFirstEven +findFirstEven = function(list) + for _index_0 = 1, #list do + local item = list[_index_0] + if type(item) == "table" then + for _index_1 = 1, #item do + local sub = item[_index_1] + if sub % 2 == 0 then + return sub + end + end + end + end + return nil +end +local findFirstEven +findFirstEven = function(list) + for _index_0 = 1, #list do + local item = list[_index_0] + if type(item) == "table" then + for _index_1 = 1, #item do + local sub = item[_index_1] + if sub % 2 == 0 then + return sub + end + end + end + end + return nil +end local f f = function(...) local t = { @@ -2631,7 +2661,7 @@ if cond then end end print("yuescript") -print(3) +print(2) print("有效的枚举类型:", "Static") do print(123, "hello") -- cgit v1.2.3-55-g6feb