(parentParticle, block)
| 15213 | return line.substr(0, firstBreak > -1 ? firstBreak : undefined) |
| 15214 | } |
| 15215 | async appendParticleAsync(parentParticle, block) { |
| 15216 | const index = parentParticle.length |
| 15217 | const parser = this._getMatchingParser(block, parentParticle, index) |
| 15218 | const { particleBreakSymbol } = parentParticle |
| 15219 | const lines = block.split(particleBreakSymbol) |
| 15220 | const subparticles = lines |
| 15221 | .slice(1) |
| 15222 | .map(line => line.substr(1)) |
| 15223 | .join(particleBreakSymbol) |
| 15224 | const particle = new parser(undefined, lines[0], parentParticle, index) |
| 15225 | if (subparticles.length) await particle.appendFromStream(subparticles) |
| 15226 | await particle.wake() |
| 15227 | return particle |
| 15228 | } |
| 15229 | createParticle(parentParticle, block, index) { |
| 15230 | const rootParticle = parentParticle.root |
| 15231 | if (rootParticle.particleTransformers) { |
no test coverage detected