()
| 1996 | // 11.1.4 Array Initialiser |
| 1997 | |
| 1998 | function parseArrayInitialiser() { |
| 1999 | var elements = [], startToken; |
| 2000 | |
| 2001 | startToken = lookahead; |
| 2002 | expect('['); |
| 2003 | |
| 2004 | while (!match(']')) { |
| 2005 | if (match(',')) { |
| 2006 | lex(); |
| 2007 | elements.push(null); |
| 2008 | } else { |
| 2009 | elements.push(parseAssignmentExpression()); |
| 2010 | |
| 2011 | if (!match(']')) { |
| 2012 | expect(','); |
| 2013 | } |
| 2014 | } |
| 2015 | } |
| 2016 | |
| 2017 | lex(); |
| 2018 | |
| 2019 | return delegate.markEnd(delegate.createArrayExpression(elements), startToken); |
| 2020 | } |
| 2021 | |
| 2022 | // 11.1.5 Object Initialiser |
| 2023 |
no test coverage detected