subject = str(self[node.subject])
self[node].emit(f"oppc_range_subscript({subject}, {start}, {end})")
+ @pc_util.Hook(pc_ast.ForExpr)
+ def ForExpr(self, node):
+ yield node
+ subject = str(self[node.subject])
+ start = str(self[node.start])
+ end = str(self[node.end])
+ self[node].emit(f"for ({subject} = {start}; {subject} != ({end} + 1); ++{subject}) {{")
+ for (level, stmt) in self[node.body]:
+ self[node].emit(stmt=stmt, level=level)
+ self[node].emit(f"}}")
+
@pc_util.Hook(pc_ast.Call.Name)
def CallName(self, node):
yield node