| 18111 | if (id) _parserPoolCache[id] = root |
| 18112 | } |
| 18113 | switchParserPool(parserPoolId) { |
| 18114 | const sourceParticle = _parserPoolCache[parserPoolId] |
| 18115 | const root = this.root |
| 18116 | root.topDownArray.forEach(part => part.definition) // Hacky. We need to bind all previous particles to their earlier definitions, which now may change. |
| 18117 | root._definition = sourceParticle._definition |
| 18118 | root._modifiedConstructor = sourceParticle._modifiedConstructor |
| 18119 | root._parserPool = sourceParticle._parserPool |
| 18120 | // Clear parser cache. |
| 18121 | delete root._parserIdIndex |
| 18122 | } |
| 18123 | get rootParsersParticles() { |
| 18124 | return this.definition.root |
| 18125 | } |