MCPcopy Create free account
hub / github.com/breck7/scroll / switchParserPool

Method switchParserPool

external/.scrollLibs.js:18113–18122  ·  view source on GitHub ↗
(parserPoolId)

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 1

forEachMethod · 0.80

Tested by

no test coverage detected