diff options
| author | Li Jin <dragon-fly@qq.com> | 2022-02-09 10:14:25 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2022-02-09 10:14:25 +0800 |
| commit | 07a64933f8d956a8bba401db2200e6f7d8244dc9 (patch) | |
| tree | 0a7da8fa2932fa89e317431b51fa1a3b19d97832 /spec/inputs | |
| parent | a6744ed09b49b740dfc2852d655f5ed6dd471cbf (diff) | |
| download | yuescript-07a64933f8d956a8bba401db2200e6f7d8244dc9.tar.gz yuescript-07a64933f8d956a8bba401db2200e6f7d8244dc9.tar.bz2 yuescript-07a64933f8d956a8bba401db2200e6f7d8244dc9.zip | |
fix the way update assignment is implemented.
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/syntax.yue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/inputs/syntax.yue b/spec/inputs/syntax.yue index aed4144..cb947e1 100644 --- a/spec/inputs/syntax.yue +++ b/spec/inputs/syntax.yue | |||
| @@ -183,6 +183,11 @@ a["hello"] += 10 | |||
| 183 | a["hello#{tostring ff}"] += 10 | 183 | a["hello#{tostring ff}"] += 10 |
| 184 | a[four].x += 10 | 184 | a[four].x += 10 |
| 185 | 185 | ||
| 186 | a.b += 1 | ||
| 187 | a.b[1].c[2+3] += 1 | ||
| 188 | with tb | ||
| 189 | .a.c += 1 | ||
| 190 | |||
| 186 | x = 0 | 191 | x = 0 |
| 187 | _ = (if ntype(v) == "fndef" then x += 1) for v in *values | 192 | _ = (if ntype(v) == "fndef" then x += 1) for v in *values |
| 188 | 193 | ||
