Changeset dd6d7c6
- Timestamp:
- May 22, 2019, 1:55:16 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- f4c2f1a
- Parents:
- 37eef7a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r37eef7a rdd6d7c6 1326 1326 1327 1327 const ast::Attribute * visit( const ast::Attribute * node ) override final { 1328 (void)node; 1328 auto attr = new Attribute( 1329 node->name, 1330 get<Expression>().acceptL(node->parameters) 1331 ); 1332 this->node = attr; 1329 1333 return nullptr; 1330 1334 } 1331 1335 1332 1336 const ast::TypeSubstitution * visit( const ast::TypeSubstitution * node ) override final { 1333 (void)node; 1337 // Handled by convertTypeSubstitution helper instead. 1338 // TypeSubstitution is not a node in the old model, so the conversion result wouldn't fit in this->node. 1339 assert( 0 ); 1334 1340 return nullptr; 1335 1341 } … … 2670 2676 2671 2677 virtual void visit( Constant * ) override final { 2672 2673 } 2674 2675 virtual void visit( Attribute * ) override final { 2676 2678 // Handled in visit( ConstantEpxr * ). 2679 // In the new tree, Constant fields are inlined into containing ConstantExpression. 2680 assert( 0 ); 2681 } 2682 2683 virtual void visit( Attribute * old ) override final { 2684 this->node = new ast::Attribute( 2685 old->name, 2686 GET_ACCEPT_V( parameters, Expr ) 2687 ); 2677 2688 } 2678 2689 2679 2690 virtual void visit( AttrExpr * ) override final { 2680 2681 assert( 0 ); 2691 assertf( false, "AttrExpr deprecated in new AST." ); 2682 2692 } 2683 2693 };
Note: See TracChangeset
for help on using the changeset viewer.