op-assign expansion now end at ']' and '}' too

This commit is contained in:
2024-07-24 06:37:57 +02:00
parent 1a1a475dd8
commit ffe1fa3aac
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -27,7 +27,8 @@ func TestExpr(t *testing.T) {
/* 13 */ {`a=3; a*=2+1; a`, int64(9), nil},
/* 14 */ {`a=3; (a*=2)+1; a`, int64(6), nil},
/* 15 */ {`a=3; a*=2)+1; a`, nil, `[1:11] unexpected token ")"`},
/* 16 */ {`
/* 16 */ {`v=[2]; a=1; v[a-=1]=5; v[0]`, int64(5), nil},
/* 17 */ {`
ds={
"init":func(@end){@current=0 but true},
//"current":func(){current},