diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-04-26 16:07:18 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-04-26 16:07:18 +0800 |
| commit | 502af415a7d72bd8229613056e5c5e1dd8ce518d (patch) | |
| tree | e2416c5acd119132c40cd41b8f587851c7f9d33e /spec/inputs/loops.moon | |
| parent | feac3c1cba6ca95b911240217f74a494680cd057 (diff) | |
| download | yuescript-502af415a7d72bd8229613056e5c5e1dd8ce518d.tar.gz yuescript-502af415a7d72bd8229613056e5c5e1dd8ce518d.tar.bz2 yuescript-502af415a7d72bd8229613056e5c5e1dd8ce518d.zip | |
add existential op support for with statement, add repeat until statement.
Diffstat (limited to 'spec/inputs/loops.moon')
| -rw-r--r-- | spec/inputs/loops.moon | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/inputs/loops.moon b/spec/inputs/loops.moon index 35427f6..24d960f 100644 --- a/spec/inputs/loops.moon +++ b/spec/inputs/loops.moon | |||
| @@ -91,6 +91,15 @@ while true | |||
| 91 | break if true | 91 | break if true |
| 92 | print "no" | 92 | print "no" |
| 93 | 93 | ||
| 94 | a = 1 | ||
| 95 | repeat | ||
| 96 | a += 1 | ||
| 97 | if a == 5 | ||
| 98 | continue | ||
| 99 | if a == 6 | ||
| 100 | break | ||
| 101 | print a | ||
| 102 | until a == 10 | ||
| 94 | 103 | ||
| 95 | for x=1,10 | 104 | for x=1,10 |
| 96 | continue if x > 3 and x < 7 | 105 | continue if x > 3 and x < 7 |
