diff options
| author | Li Jin <dragon-fly@qq.com> | 2022-05-16 01:03:05 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2022-05-16 01:03:05 +0800 |
| commit | c4935826eea8df7a161b2b4ba9262dce66d9d366 (patch) | |
| tree | 12f7fe952a777b98244253c5ecd3e0d0a73e8de8 /spec/inputs | |
| parent | e9926f70a53639c09a5605f71a34ec370395f5a9 (diff) | |
| download | yuescript-c4935826eea8df7a161b2b4ba9262dce66d9d366.tar.gz yuescript-c4935826eea8df7a161b2b4ba9262dce66d9d366.tar.bz2 yuescript-c4935826eea8df7a161b2b4ba9262dce66d9d366.zip | |
fix issue #102. fix `continue` statement locating issue.
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/loops.yue | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/inputs/loops.yue b/spec/inputs/loops.yue index 3191000..d03e661 100644 --- a/spec/inputs/loops.yue +++ b/spec/inputs/loops.yue | |||
| @@ -109,6 +109,14 @@ repeat | |||
| 109 | print a | 109 | print a |
| 110 | until a == 10 | 110 | until a == 10 |
| 111 | 111 | ||
| 112 | x = 0 | ||
| 113 | repeat | ||
| 114 | x += 1 | ||
| 115 | y = x | ||
| 116 | continue if x < 5 | ||
| 117 | print y | ||
| 118 | until y == 10 | ||
| 119 | |||
| 112 | a = 3 | 120 | a = 3 |
| 113 | until a == 0 | 121 | until a == 0 |
| 114 | a -= 1 | 122 | a -= 1 |
