This commit is contained in:
Jaime Humberto Macias Bustamante
2025-05-11 12:36:55 -07:00
parent 77282e3b7b
commit 64ee722124
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -57,6 +57,7 @@ class TestHScript extends TestCase {
assertScript("3 * 2 // + 5 \n + 6",12);
assertScript("3 /* 2\n */ + 5",8);
assertScript("[55,66,77][1]",66);
assertScript("[11,22,33,][2]", 33);
assertScript("var a = [55]; a[0] *= 2; a[0]",110);
assertScript("x",55,{ x : 55 });
assertScript("var y = 33; y",33);
+4 -1
View File
@@ -486,8 +486,11 @@ class Parser {
if(!first) {
if(tk != TComma)
unexpected(tk);
else
else {
tk = token();
if (tk == TBkClose)
break;
}
}
first = false;
push(tk);