()
| 3077 | } |
| 3078 | |
| 3079 | parseSetterMethod(): Node.FunctionExpression { |
| 3080 | const node = this.createNode(); |
| 3081 | |
| 3082 | const isGenerator = false; |
| 3083 | const previousAllowYield = this.context.allowYield; |
| 3084 | this.context.allowYield = !isGenerator; |
| 3085 | const formalParameters = this.parseFormalParameters(); |
| 3086 | if (formalParameters.params.length !== 1) { |
| 3087 | this.tolerateError(Messages.BadSetterArity); |
| 3088 | } else if (formalParameters.params[0] instanceof Node.RestElement) { |
| 3089 | this.tolerateError(Messages.BadSetterRestParameter); |
| 3090 | } |
| 3091 | const method = this.parsePropertyMethod(formalParameters); |
| 3092 | this.context.allowYield = previousAllowYield; |
| 3093 | |
| 3094 | return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); |
| 3095 | } |
| 3096 | |
| 3097 | parseGeneratorMethod(): Node.FunctionExpression { |
| 3098 | const node = this.createNode(); |
no test coverage detected