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

Method createParserPool

external/.scrollLibs.js:20219–20225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20217{
20218 class parsersParser extends ParserBackedParticle {
20219 createParserPool() {
20220 return new Particle.ParserPool(catchAllErrorParser, Object.assign(Object.assign({}, super.createParserPool()._getCueMapAsObject()), { "//": slashCommentParser }), [
20221 { regex: /^$/, parser: blankLineParser },
20222 { regex: /^[a-zA-Z0-9_]+Atom$/, parser: atomTypeDefinitionParser },
20223 { regex: /^[a-zA-Z0-9_]+Parser$/, parser: parserDefinitionParser }
20224 ])
20225 }
20226 static _parserSourceCode = `// todo Add imports parsers, along with source maps, so we can correctly support parsers split across multiple files, and better enable parsers from compositions of reusable bits?
20227// todo Do error checking for if you have a firstatomAtomType, atoms, and/or catchAllAtomType with same name.
20228// todo Add enumOption root level type?

Callers

nothing calls this directly

Calls 2

_getCueMapAsObjectMethod · 0.80
createParserPoolMethod · 0.45

Tested by

no test coverage detected