()
| 2322 | // 11.1.4 Array Initialiser |
| 2323 | |
| 2324 | function parseArrayInitialiser() { |
| 2325 | var elements = [], node = new Node(); |
| 2326 | |
| 2327 | expect('['); |
| 2328 | |
| 2329 | while (!match(']')) { |
| 2330 | if (match(',')) { |
| 2331 | lex(); |
| 2332 | elements.push(null); |
| 2333 | } else { |
| 2334 | elements.push(parseAssignmentExpression()); |
| 2335 | |
| 2336 | if (!match(']')) { |
| 2337 | expect(','); |
| 2338 | } |
| 2339 | } |
| 2340 | } |
| 2341 | |
| 2342 | lex(); |
| 2343 | |
| 2344 | return node.finishArrayExpression(elements); |
| 2345 | } |
| 2346 | |
| 2347 | // 11.1.5 Object Initialiser |
| 2348 |
no test coverage detected