@pc_util.Hook(pc_ast.Call.Name)
def CallName(self, node):
yield node
+ self[node].emit(stmt=str(node))
@pc_util.Hook(pc_ast.Call.Arguments)
def CallArguments(self, node):
for subnode in node:
if isinstance(subnode, (pc_ast.GPR, pc_ast.FPR)):
self.__regfetch[str(subnode)].append(subnode)
+ stmt = ", ".join(map(lambda subnode: str(self[subnode]), node))
+ self[node].emit(stmt=stmt)
+
+ @pc_util.Hook(pc_ast.Call)
+ def Call(self, node):
+ yield node
+ name = str(self[node.name])
+ args = str(self[node.args])
+ stmt = f"{name}({args})"
+ self[node].emit(stmt=stmt)
@pc_util.Hook(pc_ast.Symbol)
def Symbol(self, node):