Changeset 6be3b7d6 for src/ResolvExpr/AdjustExprType.cc
- Timestamp:
- Jun 25, 2019, 4:35:21 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e0e9a0b
- Parents:
- b604426
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AdjustExprType.cc
rb604426 r6be3b7d6 108 108 : symtab( syms ), tenv( e ) {} 109 109 110 void pre mutate( const ast::VoidType * ) { visit_children = false; }111 void pre mutate( const ast::BasicType * ) { visit_children = false; }112 void pre mutate( const ast::PointerType * ) { visit_children = false; }113 void pre mutate( const ast::ArrayType * ) { visit_children = false; }114 void pre mutate( const ast::FunctionType * ) { visit_children = false; }115 void pre mutate( const ast::StructInstType * ) { visit_children = false; }116 void pre mutate( const ast::UnionInstType * ) { visit_children = false; }117 void pre mutate( const ast::EnumInstType * ) { visit_children = false; }118 void pre mutate( const ast::TraitInstType * ) { visit_children = false; }119 void pre mutate( const ast::TypeInstType * ) { visit_children = false; }120 void pre mutate( const ast::TupleType * ) { visit_children = false; }121 void pre mutate( const ast::VarArgsType * ) { visit_children = false; }122 void pre mutate( const ast::ZeroType * ) { visit_children = false; }123 void pre mutate( const ast::OneType * ) { visit_children = false; }110 void previsit( const ast::VoidType * ) { visit_children = false; } 111 void previsit( const ast::BasicType * ) { visit_children = false; } 112 void previsit( const ast::PointerType * ) { visit_children = false; } 113 void previsit( const ast::ArrayType * ) { visit_children = false; } 114 void previsit( const ast::FunctionType * ) { visit_children = false; } 115 void previsit( const ast::StructInstType * ) { visit_children = false; } 116 void previsit( const ast::UnionInstType * ) { visit_children = false; } 117 void previsit( const ast::EnumInstType * ) { visit_children = false; } 118 void previsit( const ast::TraitInstType * ) { visit_children = false; } 119 void previsit( const ast::TypeInstType * ) { visit_children = false; } 120 void previsit( const ast::TupleType * ) { visit_children = false; } 121 void previsit( const ast::VarArgsType * ) { visit_children = false; } 122 void previsit( const ast::ZeroType * ) { visit_children = false; } 123 void previsit( const ast::OneType * ) { visit_children = false; } 124 124 125 const ast::Type * post mutate( const ast::ArrayType * at ) {125 const ast::Type * postvisit( const ast::ArrayType * at ) { 126 126 return new ast::PointerType{ at->base, at->qualifiers }; 127 127 } 128 128 129 const ast::Type * post mutate( const ast::FunctionType * ft ) {129 const ast::Type * postvisit( const ast::FunctionType * ft ) { 130 130 return new ast::PointerType{ ft }; 131 131 } 132 132 133 const ast::Type * post mutate( const ast::TypeInstType * inst ) {133 const ast::Type * postvisit( const ast::TypeInstType * inst ) { 134 134 // replace known function-type-variables with pointer-to-function 135 135 if ( const ast::EqvClass * eqvClass = tenv.lookup( inst->name ) ) {
Note: See TracChangeset
for help on using the changeset viewer.