diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-05-27 11:26:15 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-05-27 11:26:15 +0800 |
| commit | 87267ca9e93606b70bdc0397349b176b8d142514 (patch) | |
| tree | 1d24aded412cc9543cbe4c282401129f9fb3229a /spec/inputs | |
| parent | a9d28cb615d2bdc09d2482d5262951f2afc8d6e1 (diff) | |
| download | yuescript-87267ca9e93606b70bdc0397349b176b8d142514.tar.gz yuescript-87267ca9e93606b70bdc0397349b176b8d142514.tar.bz2 yuescript-87267ca9e93606b70bdc0397349b176b8d142514.zip | |
Updated `repeat` syntax functions.
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/loops.yue | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/inputs/loops.yue b/spec/inputs/loops.yue index 9a91b42..5df10ca 100644 --- a/spec/inputs/loops.yue +++ b/spec/inputs/loops.yue | |||
| @@ -251,4 +251,17 @@ do | |||
| 251 | if value > 5 | 251 | if value > 5 |
| 252 | item | 252 | item |
| 253 | 253 | ||
| 254 | 254 | do | |
| 255 | repeat print 1 until true | ||
| 256 | |||
| 257 | x = repeat | ||
| 258 | a = func! | ||
| 259 | break a.x | ||
| 260 | until a.v | ||
| 261 | |||
| 262 | items = repeat | ||
| 263 | item = getItem! | ||
| 264 | break unless item | ||
| 265 | item if item.value > 0 | ||
| 266 | until false | ||
| 267 | |||
