Begins a new branch in a cond section.
(self, section_id)
| 522 | self.cond_leaves[section_id] = [] |
| 523 | |
| 524 | def new_cond_branch(self, section_id): |
| 525 | """Begins a new branch in a cond section.""" |
| 526 | assert section_id in self.cond_leaves |
| 527 | |
| 528 | if section_id in self.cond_entry: |
| 529 | # Subsequent splits move back to the split point, and memorize the |
| 530 | # current leaves. |
| 531 | self.cond_leaves[section_id].append(self.leaves) |
| 532 | self.leaves = self.cond_entry[section_id] |
| 533 | else: |
| 534 | # If this is the first time we split a section, just remember the split |
| 535 | # point. |
| 536 | self.cond_entry[section_id] = self.leaves |
| 537 | |
| 538 | def exit_cond_section(self, section_id): |
| 539 | """Exits a conditional section.""" |