Permalink
Browse files

Represent holes in ArrayExpression as null

  • Loading branch information...
1 parent 379810a commit 709de7c64bffe5b624c7fededb5f79388f636ae9 @Constellation Constellation committed with Aug 22, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 esprima.js
View
5 esprima.js
@@ -1621,15 +1621,14 @@ parseYieldExpression: true
// 11.1.4 Array Initialiser
function parseArrayInitialiser() {
- var elements = [],
- undef;
+ var elements = [];
expect('[');
while (!match(']')) {
if (match(',')) {
lex();
- elements.push(undef);
+ elements.push(null);
} else {
elements.push(parseAssignmentExpression());

0 comments on commit 709de7c

Please sign in to comment.