()
| 19680 | return particleDef.generatedClassName |
| 19681 | } |
| 19682 | get asJavascriptClass() { |
| 19683 | const components = [this.parserAsJavascript, this.errorMethodToJavascript, this.atomGettersAndParserConstants, this.customJavascriptMethods].filter(identity => identity) |
| 19684 | const thisClassName = this.generatedClassName |
| 19685 | if (this._amIRoot()) { |
| 19686 | components.push(`static _parserSourceCode = \`${Utils.escapeBackTicks(this.parent.toString().replace(/\\/g, "\\\\"))}\` |
| 19687 | static cachedHandParsersProgramRoot = new HandParsersProgram(this._parserSourceCode) |
| 19688 | get handParsersProgram() { |
| 19689 | return this.constructor.cachedHandParsersProgramRoot |
| 19690 | }`) |
| 19691 | components.push(`static rootParser = ${thisClassName}`) |
| 19692 | } |
| 19693 | return `class ${thisClassName} extends ${this._getExtendsClassName()} { |
| 19694 | ${components.join("\n")} |
| 19695 | }` |
| 19696 | } |
| 19697 | _getExtendsClassName() { |
| 19698 | const extendedDef = this._getExtendedParent() |
| 19699 | return extendedDef ? extendedDef.generatedClassName : "ParserBackedParticle" |
nothing calls this directly
no test coverage detected