MCPcopy Index your code
hub / github.com/breck7/scroll / buildParsersFileCommand

Method buildParsersFileCommand

ScrollSetCLI.js:113–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111
112 // todo: can we use parsersBundle from scroll.js?
113 buildParsersFileCommand() {
114 const parserFilenames = `parsers/atomTypes.parsers
115parsers/root.parsers
116parsers/build.parsers
117parsers/comments.parsers
118parsers/blankLine.parsers
119parsers/measures.parsers
120parsers/import.parsers
121parsers/errors.parsers`
122 .split("\n")
123 .map(filepath => path.join(__dirname, filepath))
124 parserFilenames.push(this.parsersFile)
125
126 const code = parserFilenames
127 .map(Disk.read)
128 .join("\n\n")
129 .replace("catchAllParser catchAllParagraphParser", "catchAllParser errorParser")
130 .replace(/^importOnly\n/gm, "")
131 .replace(/^import .+/gm, "")
132 Disk.write(path.join(this.baseFolder, `${this.scrollSetName}.parsers`), code)
133 }
134}
135
136module.exports = { ScrollSetCLI }

Callers

nothing calls this directly

Calls 5

mapMethod · 0.80
splitMethod · 0.80
replaceMethod · 0.80
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected