Changeset 74ad8c0
- Timestamp:
- May 22, 2019, 1:29:14 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:
- 0f740d6
- Parents:
- 15934a6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r15934a6 r74ad8c0 1264 1264 1265 1265 const ast::Designation * visit( const ast::Designation * node ) override final { 1266 (void)node; 1266 auto designation = new Designation( get<Expression>().acceptL( node->designators ) ); 1267 designation->location = node->location; 1268 this->node = designation; 1267 1269 return nullptr; 1268 1270 } 1269 1271 1270 1272 const ast::Init * visit( const ast::SingleInit * node ) override final { 1271 (void)node; 1273 auto init = new SingleInit( 1274 get<Expression>().accept1( node->value ), 1275 ast::MaybeConstruct == node->maybeConstructed 1276 ); 1277 init->location = node->location; 1278 this->node = init; 1272 1279 return nullptr; 1273 1280 } 1274 1281 1275 1282 const ast::Init * visit( const ast::ListInit * node ) override final { 1276 (void)node; 1283 auto init = new ListInit( 1284 get<Initializer>().acceptL( node->initializers ), 1285 get<Designation>().acceptL( node->designations ), 1286 ast::MaybeConstruct == node->maybeConstructed 1287 ); 1288 init->location = node->location; 1289 this->node = init; 1277 1290 return nullptr; 1278 1291 } 1279 1292 1280 1293 const ast::Init * visit( const ast::ConstructorInit * node ) override final { 1281 (void)node; 1294 auto init = new ConstructorInit( 1295 get<Statement>().accept1( node->ctor ), 1296 get<Statement>().accept1( node->dtor ), 1297 get<Initializer>().accept1( node->init ) 1298 ); 1299 init->location = node->location; 1300 this->node = init; 1282 1301 return nullptr; 1283 1302 } … … 2554 2573 } 2555 2574 2556 virtual void visit( Designation * ) override final { 2557 2558 } 2559 2560 virtual void visit( SingleInit * ) override final { 2561 2562 } 2563 2564 virtual void visit( ListInit * ) override final { 2565 2566 } 2567 2568 virtual void visit( ConstructorInit * ) override final { 2569 2575 virtual void visit( Designation * old ) override final { 2576 this->node = new ast::Designation( 2577 old->location, 2578 GET_ACCEPT_V(designators, Expr) 2579 ); 2580 } 2581 2582 virtual void visit( SingleInit * old ) override final { 2583 this->node = new ast::SingleInit( 2584 old->location, 2585 GET_ACCEPT_1(value, Expr), 2586 (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast::DoConstruct 2587 ); 2588 } 2589 2590 virtual void visit( ListInit * old ) override final { 2591 this->node = new ast::ListInit( 2592 old->location, 2593 GET_ACCEPT_V(initializers, Init), 2594 GET_ACCEPT_V(designations, Designation), 2595 (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast::DoConstruct 2596 ); 2597 } 2598 2599 virtual void visit( ConstructorInit * old ) override final { 2600 this->node = new ast::ConstructorInit( 2601 old->location, 2602 GET_ACCEPT_1(ctor, Stmt), 2603 GET_ACCEPT_1(dtor, Stmt), 2604 GET_ACCEPT_1(init, Init) 2605 ); 2570 2606 } 2571 2607
Note: See TracChangeset
for help on using the changeset viewer.