MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / parseCddl

Function parseCddl

javascript/selenium-webdriver/generate_bidi.mjs:176–186  ·  view source on GitHub ↗
(cddlArg)

Source from the content-addressed store, hash-verified

174}
175
176function parseCddl(cddlArg) {
177 const cddlPath = resolveInputPath(cddlArg)
178 if (!existsSync(cddlPath)) {
179 console.error(`Error: CDDL file not found: ${cddlPath}`)
180 process.exit(1)
181 }
182 console.log(`Parsing CDDL: ${cddlPath}`)
183 const ast = parse(cddlPath)
184 console.log(` ${ast.length} top-level definitions`)
185 return ast
186}
187
188function readJson(fileArg, label) {
189 const path = resolveInputPath(fileArg)

Callers 1

mainFunction · 0.85

Calls 4

resolveInputPathFunction · 0.85
logMethod · 0.65
parseFunction · 0.50
errorMethod · 0.45

Tested by

no test coverage detected