()
| 3139 | } |
| 3140 | |
| 3141 | parseYieldExpression(): Node.YieldExpression { |
| 3142 | const node = this.createNode(); |
| 3143 | this.expectKeyword('yield'); |
| 3144 | |
| 3145 | let argument: Node.Expression | null = null; |
| 3146 | let delegate = false; |
| 3147 | if (!this.hasLineTerminator) { |
| 3148 | const previousAllowYield = this.context.allowYield; |
| 3149 | this.context.allowYield = false; |
| 3150 | delegate = this.match('*'); |
| 3151 | if (delegate) { |
| 3152 | this.nextToken(); |
| 3153 | argument = this.parseAssignmentExpression(); |
| 3154 | } else if (this.isStartOfExpression()) { |
| 3155 | argument = this.parseAssignmentExpression(); |
| 3156 | } |
| 3157 | this.context.allowYield = previousAllowYield; |
| 3158 | } |
| 3159 | |
| 3160 | return this.finalize(node, new Node.YieldExpression(argument, delegate)); |
| 3161 | } |
| 3162 | |
| 3163 | // https://tc39.github.io/ecma262/#sec-class-definitions |
| 3164 |
no test coverage detected