(cddlName, method, paramsRef)
| 34 | const field = (name, type, occ = { n: 1, m: 1 }) => ({ Name: name, Occurrence: occ, Type: type, Comments: [] }) |
| 35 | const group = (name, props) => ({ Type: 'group', Name: name, Properties: props, IsChoiceAddition: false, Comments: [] }) |
| 36 | const leaf = (cddlName, method, paramsRef) => |
| 37 | group(cddlName, [field('method', [lit(method)]), field('params', [ref(paramsRef)])]) |
| 38 | |
| 39 | // A tiny but representative AST + model. |
| 40 | const AST = [ |
no test coverage detected