for (level, stmt) in self[node.body]:
self[node].emit(stmt=stmt, level=level)
if node.orelse:
- self[node].emit("else")
+ self[node].emit(stmt="else")
for (level, stmt) in self[node.orelse]:
self[node].emit(stmt=stmt, level=level)
for (level, stmt) in self[node.body]:
self[node].emit(stmt=stmt, level=level)
if node.orelse:
- self[node].emit("else")
+ self[node].emit(stmt="else")
for (level, stmt) in self[node.orelse]:
self[node].emit(stmt=stmt, level=level)
@pc_util.Hook(pc_ast.SwitchExpr)
def SwitchExpr(self, node):
yield node
- self[node].emit(f"switch({str(self[node.subject])})")
+ self[node].emit(stmt=f"switch({str(self[node.subject])})")
with self[node]:
for (level, stmt) in self[node.cases]:
self[node].emit(stmt=stmt, level=level)