diff options
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/destructure.yue | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue index d161fd8..73e4d33 100644 --- a/spec/inputs/destructure.yue +++ b/spec/inputs/destructure.yue | |||
| @@ -80,6 +80,8 @@ do | |||
| 80 | for {x,y} in *thing | 80 | for {x,y} in *thing |
| 81 | print x,y | 81 | print x,y |
| 82 | 82 | ||
| 83 | for [x,y] in *thing | ||
| 84 | print x,y | ||
| 83 | 85 | ||
| 84 | -- | 86 | -- |
| 85 | 87 | ||
| @@ -178,10 +180,16 @@ do | |||
| 178 | for {left = "null", right = false} in *tuples | 180 | for {left = "null", right = false} in *tuples |
| 179 | print left, right | 181 | print left, right |
| 180 | 182 | ||
| 183 | for [left = "null", right = false] in *tuples | ||
| 184 | print left, right | ||
| 185 | |||
| 181 | do | 186 | do |
| 182 | {_, a, _, b} = tb -- list placeholder | 187 | {_, a, _, b} = tb -- list placeholder |
| 183 | 188 | ||
| 184 | do | 189 | do |
| 190 | [a, _, b, _] = tb -- list placeholder | ||
| 191 | |||
| 192 | do | ||
| 185 | {x: a.b = 1, y: a.c = 2} = x.x.x | 193 | {x: a.b = 1, y: a.c = 2} = x.x.x |
| 186 | 194 | ||
| 187 | do | 195 | do |
