def visit_coerce_expr(self, o: CoerceExpr) -> None: self.string('{') self.full_type(o.target_type) if coerce.is_special_primitive(o.source_type): self.string(' <= ') self.type(o.source_type) self.string(' ') self.node(o.expr) self.string('}')
self.string(', ') self.string(')') def visit_member_expr(self, o): self.node(o.expr) self.string('.' + o.name) if o.direct: self.string('!') def visit_name_expr(self, o): self.string(o.name) void visit_coerce_expr(self, CoerceExpr o): self.string('{') self.full_type(o.target_type) if coerce.is_special_primitive(o.source_type): self.string(' <= ') self.type(o.source_type) self.string(' ') self.node(o.expr) self.string('}') void visit_type_expr(self, TypeExpr o): # Type expressions are only generated during transformation, so we must # use automatic formatting. self.string('<') self.full_type(o.type) self.string('>') def visit_index_expr(self, o): self.node(o.base)