(
this: Parser,
classBody: Undone<N.ClassBody>,
prop: Undone<N.ClassAccessorProperty>,
isPrivate: boolean,
)
| 2055 | } |
| 2056 | |
| 2057 | pushClassAccessorProperty( |
| 2058 | this: Parser, |
| 2059 | classBody: Undone<N.ClassBody>, |
| 2060 | prop: Undone<N.ClassAccessorProperty>, |
| 2061 | isPrivate: boolean, |
| 2062 | ) { |
| 2063 | if (!isPrivate && !prop.computed && this.nameIsConstructor(prop.key)) { |
| 2064 | // Non-computed field, which is either an identifier named "constructor" |
| 2065 | // or a string literal named "constructor" |
| 2066 | this.raise(Errors.ConstructorClassField, prop.key); |
| 2067 | } |
| 2068 | |
| 2069 | const node = this.parseClassAccessorProperty(prop); |
| 2070 | classBody.body.push(node); |
| 2071 | |
| 2072 | if (isPrivate) { |
| 2073 | this.classScope.declarePrivateName( |
| 2074 | this.getPrivateNameSV(node.key as N.PrivateName), |
| 2075 | ClassElementType.OTHER, |
| 2076 | node.key.start!, |
| 2077 | ); |
| 2078 | } |
| 2079 | } |
| 2080 | |
| 2081 | pushClassMethod( |
| 2082 | this: Parser, |
nothing calls this directly
no test coverage detected