(cddlName, method, paramsRef)
| 27 | const field = (name, type, occ = { n: 1, m: 1 }) => ({ Name: name, Occurrence: occ, Type: type, Comments: [] }) |
| 28 | const group = (name, props) => ({ Type: 'group', Name: name, Properties: props, IsChoiceAddition: false, Comments: [] }) |
| 29 | const leaf = (cddlName, method, paramsRef) => |
| 30 | group(cddlName, [field('method', [lit(method)]), field('params', [ref(paramsRef)])]) |
| 31 | |
| 32 | // A tiny but representative AST + model. |
| 33 | const AST = [ |
no test coverage detected