diff options
| author | Li Jin <dragon-fly@qq.com> | 2023-01-29 16:39:35 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2023-01-29 16:39:35 +0800 |
| commit | 8d648dc8c075fc1cf8d89d74c1425cdeb47e8089 (patch) | |
| tree | d038d12f7e683e490a36d431376c2da6dd2b17bf /spec/inputs | |
| parent | e10b1b163a9a173f32b956bf1fb9be00194352b5 (diff) | |
| download | yuescript-8d648dc8c075fc1cf8d89d74c1425cdeb47e8089.tar.gz yuescript-8d648dc8c075fc1cf8d89d74c1425cdeb47e8089.tar.bz2 yuescript-8d648dc8c075fc1cf8d89d74c1425cdeb47e8089.zip | |
refactor break loop keyword checking.
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/loops.yue | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/inputs/loops.yue b/spec/inputs/loops.yue index 51eb10b..5cadbf0 100644 --- a/spec/inputs/loops.yue +++ b/spec/inputs/loops.yue | |||
| @@ -173,4 +173,26 @@ do | |||
| 173 | for thing in *xxx | 173 | for thing in *xxx |
| 174 | print thing | 174 | print thing |
| 175 | 175 | ||
| 176 | 176 | do | |
| 177 | for i = 1, 10 | ||
| 178 | repeat | ||
| 179 | with? tb | ||
| 180 | .a = 1 | ||
| 181 | continue if .b | ||
| 182 | do | ||
| 183 | if .c | ||
| 184 | break | ||
| 185 | until true | ||
| 186 | switch x | ||
| 187 | when 123 | ||
| 188 | break | ||
| 189 | else | ||
| 190 | continue | ||
| 191 | if y | ||
| 192 | continue | ||
| 193 | else | ||
| 194 | break | ||
| 195 | do do do | ||
| 196 | print i | ||
| 197 | continue | ||
| 198 | print "abc" | ||
