(cddlArg)
| 174 | } |
| 175 | |
| 176 | function 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 | |
| 188 | function readJson(fileArg, label) { |
| 189 | const path = resolveInputPath(fileArg) |
no test coverage detected