From 1334c0ae67fdf4cb1377e0e7a3ef291f5cf694c0 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Sat, 19 Oct 2024 00:35:11 +0800 Subject: Fixed issue #174. --- spec/inputs/loops.yue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'spec/inputs') diff --git a/spec/inputs/loops.yue b/spec/inputs/loops.yue index 5cadbf0..c5b28b3 100644 --- a/spec/inputs/loops.yue +++ b/spec/inputs/loops.yue @@ -196,3 +196,20 @@ do print i continue print "abc" + +do + while byte := stream::read_one! + -- do something with the byte + continue if byte == 0 + print byte + +do + local func + while success, result := try func 1, 2, 3 + catch err + print err + print result + +do + until x := func 'a', b do + print "false expected" -- cgit v1.2.3-55-g6feb