(filepath = "")
| 18377 | return this |
| 18378 | } |
| 18379 | getParserUsage(filepath = "") { |
| 18380 | // returns a report on what parsers from its language the program uses |
| 18381 | const usage = new Particle() |
| 18382 | const handParsersProgram = this.handParsersProgram |
| 18383 | handParsersProgram.validConcreteAndAbstractParserDefinitions.forEach(def => { |
| 18384 | const requiredAtomTypeIds = def.atomParser.getRequiredAtomTypeIds() |
| 18385 | usage.appendLine([def.parserIdFromDefinition, "line-id", "parser", requiredAtomTypeIds.join(" ")].join(" ")) |
| 18386 | }) |
| 18387 | this.topDownArray.forEach((particle, lineNumber) => { |
| 18388 | const stats = usage.getParticle(particle.parserId) |
| 18389 | stats.appendLine([filepath + "-" + lineNumber, particle.atoms.join(" ")].join(" ")) |
| 18390 | }) |
| 18391 | return usage |
| 18392 | } |
| 18393 | toPaintParticles() { |
| 18394 | return this.topDownArray.map(subparticle => subparticle.indentation + subparticle.getLinePaints()).join("\n") |
| 18395 | } |
nothing calls this directly
no test coverage detected