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

Method _initRootParserDefinitionParticle

external/.scrollLibs.js:19968–19979  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

rootParserDefinitionMethod · 0.95

Calls 2

concatMethod · 0.80

Tested by

no test coverage detected