(v: Value | Control)
| 51 | } |
| 52 | |
| 53 | export function unWrapRet(v: Value | Control): Value { |
| 54 | switch (v.type) { |
| 55 | case 'return': |
| 56 | return v.value; |
| 57 | default: { |
| 58 | assertValue(v); |
| 59 | return v; |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | export function assertValue(v: Value | Control): asserts v is Value { |
| 65 | switch (v.type) { |
no test coverage detected