aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/inputs/syntax.yue5
-rw-r--r--spec/outputs/syntax.lua12
2 files changed, 16 insertions, 1 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
183a["hello#{tostring ff}"] += 10 183a["hello#{tostring ff}"] += 10
184a[four].x += 10 184a[four].x += 10
185 185
186a.b += 1
187a.b[1].c[2+3] += 1
188with tb
189 .a.c += 1
190
186x = 0 191x = 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
diff --git a/spec/outputs/syntax.lua b/spec/outputs/syntax.lua
index 3187898..ed8ed39 100644
--- a/spec/outputs/syntax.lua
+++ b/spec/outputs/syntax.lua
@@ -184,7 +184,17 @@ local _update_0 = "hello"
184a[_update_0] = a[_update_0] + 10 184a[_update_0] = a[_update_0] + 10
185local _update_1 = "hello" .. tostring(tostring(ff)) 185local _update_1 = "hello" .. tostring(tostring(ff))
186a[_update_1] = a[_update_1] + 10 186a[_update_1] = a[_update_1] + 10
187a[four].x = a[four].x + 10 187local _obj_0 = a[four]
188_obj_0.x = _obj_0.x + 10
189a.b = a.b + 1
190local _obj_1 = a.b[1].c
191local _update_2 = 2 + 3
192_obj_1[_update_2] = _obj_1[_update_2] + 1
193do
194 local _with_0 = tb
195 local _obj_2 = _with_0.a
196 _obj_2.c = _obj_2.c + 1
197end
188x = 0 198x = 0
189local _list_0 = values 199local _list_0 = values
190for _index_0 = 1, #_list_0 do 200for _index_0 = 1, #_list_0 do