def else_(self, *args: StatementSource) -> "IfBuilder": self.otherwise.extend(to_statement(arg) for arg in args) return self
def do(self, *args: StatementSource) -> "WithBuilder": self.statements.extend(to_statement(arg) for arg in args) return self
def then(self, *args: StatementSource) -> "IfBuilder": self.statements.extend(to_statement(arg) for arg in args) return self
def then(self, *args: StatementSource) -> "IfBuilder": self.statements.extend(to_statement(arg) for arg in args) self.parent.elsif_clauses.append(self.build()) return self.parent
def do(self, *args: StatementSource) -> "BodyBuilder": self.items.extend(to_statement(arg) for arg in args) return self
def or_(self, *args: StatementSource) -> "EitherBuilder": self.items.append([to_statement(arg) for arg in args]) return self
def __init__(self, *args: StatementSource, label: LabelSource = None): self.items = [[to_statement(arg) for arg in args]] self.label = label