()
| 1397 | } |
| 1398 | |
| 1399 | parseUnaryExpression(): Node.Expression { |
| 1400 | let expr; |
| 1401 | |
| 1402 | if (this.match('+') || this.match('-') || this.match('~') || this.match('!') || |
| 1403 | this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) { |
| 1404 | const node = this.startNode(this.lookahead); |
| 1405 | const token = this.nextToken(); |
| 1406 | expr = this.inheritCoverGrammar(this.parseUnaryExpression); |
| 1407 | expr = this.finalize(node, new Node.UnaryExpression(token.value, expr)); |
| 1408 | if (this.context.strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { |
| 1409 | this.tolerateError(Messages.StrictDelete); |
| 1410 | } |
| 1411 | this.context.isAssignmentTarget = false; |
| 1412 | this.context.isBindingElement = false; |
| 1413 | } else if (this.context.await && this.matchContextualKeyword('await')) { |
| 1414 | expr = this.parseAwaitExpression(); |
| 1415 | } else { |
| 1416 | expr = this.parseUpdateExpression(); |
| 1417 | } |
| 1418 | |
| 1419 | return expr; |
| 1420 | } |
| 1421 | |
| 1422 | parseExponentiationExpression(): Node.Expression { |
| 1423 | const startToken = this.lookahead; |
no test coverage detected