2003/06/26 01:53:37
[org.ibex.core.git] / src / org / xwt / js / Parser.java
index 670f68e..10159b7 100644 (file)
@@ -168,11 +168,11 @@ class Parser extends Lexer implements ByteCodes {
             if (peekToken() != RB)
                 while(true) {                                               // iterate over the initialization values
                     int size = b.size();
+                    b.add(parserLine, LITERAL, new Integer(i++));           // push the index in the array to place it into
                     if (peekToken() == COMMA || peekToken() == RB)
                         b.add(parserLine, LITERAL, null);                   // for stuff like [1,,2,]
                     else
                         startExpr(b, -1);                                   // push the value onto the stack
-                    b.add(parserLine, LITERAL, new Integer(i++));           // push the index in the array to place it into
                     b.add(parserLine, PUT);                                 // put it into the array
                     b.add(parserLine, POP);                                 // discard the value remaining on the stack
                     if (peekToken() == RB) break;