(particle = undefined)
| 19282 | return atomIndex >= numberOfRequiredAtoms |
| 19283 | } |
| 19284 | getAtomArray(particle = undefined) { |
| 19285 | const atomCount = particle ? particle.atoms.length : 0 |
| 19286 | const def = this._definition |
| 19287 | const parsersProgram = def.languageDefinitionProgram |
| 19288 | const requiredAtomTypeIds = this.getRequiredAtomTypeIds() |
| 19289 | const numberOfRequiredAtoms = requiredAtomTypeIds.length |
| 19290 | const actualAtomCountOrRequiredAtomCount = Math.max(atomCount, numberOfRequiredAtoms) |
| 19291 | const atoms = [] |
| 19292 | // A for loop instead of map because "numberOfAtomsToFill" can be longer than atoms.length |
| 19293 | for (let atomIndex = 0; atomIndex < actualAtomCountOrRequiredAtomCount; atomIndex++) { |
| 19294 | const isCatchAll = this._isCatchAllAtom(atomIndex, numberOfRequiredAtoms, atomCount) |
| 19295 | let atomTypeId = isCatchAll ? this.catchAllAtomTypeId : this._getAtomTypeId(atomIndex, requiredAtomTypeIds, atomCount) |
| 19296 | let atomTypeDefinition = parsersProgram.getAtomTypeDefinitionById(atomTypeId) |
| 19297 | let atomConstructor |
| 19298 | if (atomTypeDefinition) atomConstructor = atomTypeDefinition.getAtomConstructor() |
| 19299 | else if (atomTypeId) atomConstructor = ParsersUnknownAtomTypeAtom |
| 19300 | else { |
| 19301 | atomConstructor = ParsersExtraAtomAtomTypeAtom |
| 19302 | atomTypeId = PreludeAtomTypeIds.extraAtomAtom |
| 19303 | atomTypeDefinition = parsersProgram.getAtomTypeDefinitionById(atomTypeId) |
| 19304 | } |
| 19305 | const anyAtomConstructor = atomConstructor |
| 19306 | atoms[atomIndex] = new anyAtomConstructor(particle, atomIndex, atomTypeDefinition, atomTypeId, isCatchAll, def) |
| 19307 | } |
| 19308 | return atoms |
| 19309 | } |
| 19310 | } |
| 19311 | class PrefixAtomParser extends AbstractAtomParser {} |
| 19312 | class PostfixAtomParser extends AbstractAtomParser { |
nothing calls this directly
no test coverage detected