()
| 19966 | return this.findLast(def => def instanceof AbstractParserDefinitionParser && def.has(ParsersConstants.root) && def._hasValidParserId()) |
| 19967 | } |
| 19968 | _initRootParserDefinitionParticle() { |
| 19969 | if (this._cache_rootParserParticle) return |
| 19970 | if (!this._cache_rootParserParticle) this._cache_rootParserParticle = this.lastRootParserDefinitionParticle |
| 19971 | // By default, have a very permissive basic root particle. |
| 19972 | // todo: whats the best design pattern to use for this sort of thing? |
| 19973 | if (!this._cache_rootParserParticle) { |
| 19974 | this._cache_rootParserParticle = this.concat(`${ParsersConstants.DefaultRootParser} |
| 19975 | ${ParsersConstants.root} |
| 19976 | ${ParsersConstants.catchAllParser} ${ParsersConstants.BlobParser}`)[0] |
| 19977 | this._addDefaultCatchAllBlobParser() |
| 19978 | } |
| 19979 | } |
| 19980 | get rootParserDefinition() { |
| 19981 | this._initRootParserDefinitionParticle() |
| 19982 | return this._cache_rootParserParticle |
no test coverage detected