| Server IP : 217.160.0.135 / Your IP : 216.73.217.37 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/nodejs/acorn-private-methods/dist/ |
Upload File : |
import privateClassElements from 'acorn-private-class-elements';
// eslint-disable-next-line node/no-unsupported-features/es-syntax
// eslint-disable-next-line node/no-unsupported-features/es-syntax
function privateMethods(Parser) {
const ExtendedParser = privateClassElements(Parser);
return class extends ExtendedParser {
// Parse private methods
parseClassElement(_constructorAllowsSuper) {
const oldInClassMemberName = this._inClassMemberName;
this._inClassMemberName = true;
const result = super.parseClassElement.apply(this, arguments);
this._inClassMemberName = oldInClassMemberName;
return result
}
parsePropertyName(prop) {
const isPrivate = this.options.ecmaVersion >= 8 && this._inClassMemberName && this.type == this.privateIdentifierToken && !prop.static;
this._inClassMemberName = false;
if (!isPrivate) return super.parsePropertyName(prop)
return this.parsePrivateClassElementName(prop)
}
}
}
export { privateMethods as default };
//# sourceMappingURL=acorn-private-methods.mjs.map