示例#1
0
 def visit_TernaryOpExpr(self, node: TernaryOpExpr) -> gtir.TernaryOp:
     return gtir.TernaryOp(
         cond=self.visit(node.condition),
         true_expr=self.visit(node.then_expr),
         false_expr=self.visit(node.else_expr),
         loc=location_to_source_location(node.loc),
     )
示例#2
0
 def visit_TernaryOpExpr(self, node: TernaryOpExpr) -> gtir.TernaryOp:
     return gtir.TernaryOp(
         cond=self.visit(node.condition),
         true_expr=self.visit(node.then_expr),
         false_expr=self.visit(node.else_expr),
     )