pc_ast.Eq, pc_ast.NotEq,
pc_ast.Ge, pc_ast.Gt,
)
+ if isinstance(node.left, pc_ast.IfExpr):
+ self.ternary(node=node.left)
+ if isinstance(node.right, pc_ast.IfExpr):
+ self.ternary(node=node.right)
+
if isinstance(node.op, comparison):
ccall = self.ccall(name=str(self[node.op]), node=node, code=[
self[node.left],
@pc_util.Hook(pc_ast.UnaryExpr)
def UnaryExpr(self, node):
yield node
+ if isinstance(node.value, pc_ast.IfExpr):
+ self.ternary(node=node.value)
ccall = self.ccall(name=str(self[node.op]), node=node, code=[
self[node.value],
])