(code: string, at: number)
| 178 | * protected by their required header parens. Only a `do` that starts a |
| 179 | * statement is a loop. */ |
| 180 | const startsStatement = (code: string, at: number): boolean => { |
| 181 | const before = code.slice(0, at).trimEnd(); |
| 182 | return before === "" || /[;{}()]$/.test(before); |
| 183 | }; |
| 184 | |
| 185 | /** The first hook called inside any loop body, or `undefined`. */ |
| 186 | const hookCalledInLoop = (code: string): string | undefined => { |