The run a site belongs to — registered to run later, started together — or null for plain sequence.
(site: ProgramSite)
| 336 | |
| 337 | /** The run a site belongs to — registered to run later, started together — or null for plain sequence. */ |
| 338 | function runFor(site: ProgramSite): { block: 'later' | 'together'; by?: string } | null { |
| 339 | const fires = site.trigger; |
| 340 | if (fires && fires.kind === 'callback' && LATER_OF.test(fires.name)) return { block: 'later', by: fires.name }; |
| 341 | if (site.within && TOGETHER.test(site.within)) return { block: 'together', by: site.within }; |
| 342 | return null; |
| 343 | } |
| 344 | |
| 345 | /** An arm of a fork by its condition, reusing the one already open for it. */ |
| 346 | function armFor(fork: Extract<WireItem, { kind: 'fork' }>, g: BranchGuard): WireArm { |