Пример #1
0
 def else_(self, *args: StatementSource) -> "IfBuilder":
     self.otherwise.extend(to_statement(arg) for arg in args)
     return self
Пример #2
0
 def do(self, *args: StatementSource) -> "WithBuilder":
     self.statements.extend(to_statement(arg) for arg in args)
     return self
Пример #3
0
 def then(self, *args: StatementSource) -> "IfBuilder":
     self.statements.extend(to_statement(arg) for arg in args)
     return self
Пример #4
0
 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
Пример #5
0
 def do(self, *args: StatementSource) -> "BodyBuilder":
     self.items.extend(to_statement(arg) for arg in args)
     return self
Пример #6
0
 def or_(self, *args: StatementSource) -> "EitherBuilder":
     self.items.append([to_statement(arg) for arg in args])
     return self
Пример #7
0
 def __init__(self, *args: StatementSource, label: LabelSource = None):
     self.items = [[to_statement(arg) for arg in args]]
     self.label = label