| 213 | |
| 214 | |
| 215 | def fmt_summary(analysis): |
| 216 | # XXX Support sorting and grouping. |
| 217 | items = list(analysis) |
| 218 | total = len(items) |
| 219 | |
| 220 | def section(name): |
| 221 | _, render = build_section(name, items) |
| 222 | yield from render() |
| 223 | |
| 224 | yield from section('types') |
| 225 | yield from section('functions') |
| 226 | yield from section('variables') |
| 227 | yield from section('statements') |
| 228 | |
| 229 | yield '' |
| 230 | # yield f'grand total: {len(supported) + len(unsupported)}' |
| 231 | yield f'grand total: {total}' |
| 232 | |
| 233 | |
| 234 | def _fmt_one_summary(item, extra=None): |