()
| 2420 | // https://tc39.github.io/ecma262/#sec-with-statement |
| 2421 | |
| 2422 | parseWithStatement(): Node.WithStatement { |
| 2423 | if (this.context.strict) { |
| 2424 | this.tolerateError(Messages.StrictModeWith); |
| 2425 | } |
| 2426 | |
| 2427 | const node = this.createNode(); |
| 2428 | let body; |
| 2429 | |
| 2430 | this.expectKeyword('with'); |
| 2431 | this.expect('('); |
| 2432 | const object = this.parseExpression(); |
| 2433 | |
| 2434 | if (!this.match(')') && this.config.tolerant) { |
| 2435 | this.tolerateUnexpectedToken(this.nextToken()); |
| 2436 | body = this.finalize(this.createNode(), new Node.EmptyStatement()); |
| 2437 | } else { |
| 2438 | this.expect(')'); |
| 2439 | body = this.parseStatement(); |
| 2440 | } |
| 2441 | |
| 2442 | return this.finalize(node, new Node.WithStatement(object, body)); |
| 2443 | } |
| 2444 | |
| 2445 | // https://tc39.github.io/ecma262/#sec-switch-statement |
| 2446 |
no test coverage detected