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