yield node
self[node].emit(f"ctx->XLEN")
+ @pc_util.Hook(pc_ast.SubscriptExpr)
+ def SubscriptExpr(self, node):
+ yield node
+ index = str(self[node.index])
+ subject = str(self[node.subject])
+ self[node].emit(f"oppc_subscript({subject}, {index})")
+
+ @pc_util.Hook(pc_ast.RangeSubscriptExpr)
+ def RangeSubscriptExpr(self, node):
+ yield node
+ start = str(self[node.start])
+ end = str(self[node.end])
+ subject = str(self[node.subject])
+ self[node].emit(f"oppc_range_subscript({subject}, {start}, {end})")
+
@pc_util.Hook(pc_ast.Call.Name)
def CallName(self, node):
yield node