* Build a name → definition map from the AST (deduplicated — first wins).
(ast)
| 466 | * Build a name → definition map from the AST (deduplicated — first wins). |
| 467 | */ |
| 468 | function buildDefMap(ast) { |
| 469 | const map = new Map() |
| 470 | for (const def of ast) { |
| 471 | if (def.Name && !map.has(def.Name)) map.set(def.Name, def) |
| 472 | } |
| 473 | return map |
| 474 | } |
| 475 | |
| 476 | /** Extract {domain, methodStr, operationName, paramsCddl} from a command/event leaf def. */ |
| 477 | function parseLeafDef(def) { |
no test coverage detected