(scope: PseudocodeScope, ordered: readonly ScopeEntry[])
| 453 | } |
| 454 | |
| 455 | function titleOf(scope: PseudocodeScope, ordered: readonly ScopeEntry[]): string { |
| 456 | const label = scope.label ?? ordered[0]?.name ?? ''; |
| 457 | switch (scope.kind) { |
| 458 | case 'class': |
| 459 | return pseudocodeClassTitle(label); |
| 460 | case 'selection': |
| 461 | return pseudocodeSelectionTitle(ordered.length); |
| 462 | case 'closure': |
| 463 | return pseudocodeClosureTitle(label); |
| 464 | default: |
| 465 | return pseudocodeSymbolTitle(label); |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | /** |
| 470 | * One symbol's lines: its steps, then what it can raise, then what it reads. |
no test coverage detected