Enters a conditional section. Conditional sections define an entry node, and one or more branches. Args: section_id: Hashable, the same node that will be used in calls to the section_id arg passed to new_cond_branch
(self, section_id)
| 508 | del self.section_entry[section_id] |
| 509 | |
| 510 | def enter_cond_section(self, section_id): |
| 511 | """Enters a conditional section. |
| 512 | |
| 513 | Conditional sections define an entry node, and one or more branches. |
| 514 | |
| 515 | Args: |
| 516 | section_id: Hashable, the same node that will be used in calls to the |
| 517 | section_id arg passed to new_cond_branch |
| 518 | """ |
| 519 | |
| 520 | assert section_id not in self.cond_entry |
| 521 | assert section_id not in self.cond_leaves |
| 522 | self.cond_leaves[section_id] = [] |
| 523 | |
| 524 | def new_cond_branch(self, section_id): |
| 525 | """Begins a new branch in a cond section.""" |