Changeset 413f7f8 for src/Parser/TypeData.cc
- Timestamp:
- Jul 7, 2015, 1:49:58 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 82dd287
- Parents:
- e0ff3e6 (diff), 8686f31 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
src/Parser/TypeData.cc (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
re0ff3e6 r413f7f8 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 18 22:06:23201513 // Update Count : 2 112 // Last Modified On : Fri Jun 26 07:30:06 2015 13 // Update Count : 26 14 14 // 15 15 … … 53 53 aggregate->params = 0; 54 54 aggregate->actuals = 0; 55 aggregate-> members = 0;55 aggregate->fields = 0; 56 56 break; 57 57 case AggregateInst: … … 119 119 delete aggregate->params; 120 120 delete aggregate->actuals; 121 delete aggregate-> members;121 delete aggregate->fields; 122 122 delete aggregate; 123 123 break; … … 190 190 newtype->aggregate->params = maybeClone( aggregate->params ); 191 191 newtype->aggregate->actuals = maybeClone( aggregate->actuals ); 192 newtype->aggregate-> members = maybeClone( aggregate->members );192 newtype->aggregate->fields = maybeClone( aggregate->fields ); 193 193 newtype->aggregate->name = aggregate->name; 194 194 newtype->aggregate->kind = aggregate->kind; … … 237 237 if ( forall ) { 238 238 os << "forall " << endl; 239 forall->printList( os, indent +4 );239 forall->printList( os, indent + 4 ); 240 240 } // if 241 241 … … 277 277 os << "function" << endl; 278 278 if ( function->params ) { 279 os << string( indent +2, ' ' ) << "with parameters " << endl;280 function->params->printList( os, indent +4 );279 os << string( indent + 2, ' ' ) << "with parameters " << endl; 280 function->params->printList( os, indent + 4 ); 281 281 } else { 282 os << string( indent +2, ' ' ) << "with no parameters " << endl;282 os << string( indent + 2, ' ' ) << "with no parameters " << endl; 283 283 } // if 284 284 if ( function->idList ) { 285 os << string( indent +2, ' ' ) << "with old-style identifier list " << endl;286 function->idList->printList( os, indent +4 );285 os << string( indent + 2, ' ' ) << "with old-style identifier list " << endl; 286 function->idList->printList( os, indent + 4 ); 287 287 } // if 288 288 if ( function->oldDeclList ) { 289 os << string( indent +2, ' ' ) << "with old-style declaration list " << endl;290 function->oldDeclList->printList( os, indent +4 );291 } // if 292 os << string( indent +2, ' ' ) << "returning ";289 os << string( indent + 2, ' ' ) << "with old-style declaration list " << endl; 290 function->oldDeclList->printList( os, indent + 4 ); 291 } // if 292 os << string( indent + 2, ' ' ) << "returning "; 293 293 if ( base ) { 294 base->print( os, indent +4 );294 base->print( os, indent + 4 ); 295 295 } else { 296 296 os << "nothing "; … … 298 298 os << endl; 299 299 if ( function->hasBody ) { 300 os << string( indent +2, ' ' ) << "with body " << endl;300 os << string( indent + 2, ' ' ) << "with body " << endl; 301 301 } // if 302 302 if ( function->body ) { 303 function->body->printList( os, indent +2 );303 function->body->printList( os, indent + 2 ); 304 304 } // if 305 305 break; … … 307 307 os << DeclarationNode::aggregateName[ aggregate->kind ] << ' ' << aggregate->name << endl; 308 308 if ( aggregate->params ) { 309 os << string( indent +2, ' ' ) << "with type parameters " << endl;310 aggregate->params->printList( os, indent +4 );309 os << string( indent + 2, ' ' ) << "with type parameters " << endl; 310 aggregate->params->printList( os, indent + 4 ); 311 311 } // if 312 312 if ( aggregate->actuals ) { 313 os << string( indent +2, ' ' ) << "instantiated with actual parameters " << endl;314 aggregate->actuals->printList( os, indent +4 );315 } // if 316 if ( aggregate-> members ) {317 os << string( indent +2, ' ' ) << "with members " << endl;318 aggregate-> members->printList( os, indent+4 );313 os << string( indent + 2, ' ' ) << "instantiated with actual parameters " << endl; 314 aggregate->actuals->printList( os, indent + 4 ); 315 } // if 316 if ( aggregate->fields ) { 317 os << string( indent + 2, ' ' ) << "with members " << endl; 318 aggregate->fields->printList( os, indent + 4 ); 319 319 /// } else { 320 /// os << string( indent +2, ' ' ) << "with no members " << endl;320 /// os << string( indent + 2, ' ' ) << "with no members " << endl; 321 321 } // if 322 322 break; … … 329 329 } // if 330 330 if ( aggInst->params ) { 331 os << string( indent +2, ' ' ) << "with parameters " << endl;332 aggInst->params->printList( os, indent +2 );331 os << string( indent + 2, ' ' ) << "with parameters " << endl; 332 aggInst->params->printList( os, indent + 2 ); 333 333 } // if 334 334 break; … … 337 337 if ( enumeration->constants ) { 338 338 os << "with constants" << endl; 339 enumeration->constants->printList( os, indent +2 );339 enumeration->constants->printList( os, indent + 2 ); 340 340 } // if 341 341 break; … … 354 354 } // if 355 355 if ( symbolic->params ) { 356 os << endl << string( indent +2, ' ' ) << "with parameters" << endl;356 os << endl << string( indent + 2, ' ' ) << "with parameters" << endl; 357 357 symbolic->params->printList( os, indent + 2 ); 358 358 } // if 359 359 if ( symbolic->assertions ) { 360 os << endl << string( indent +2, ' ' ) << "with assertions" << endl;360 os << endl << string( indent + 2, ' ' ) << "with assertions" << endl; 361 361 symbolic->assertions->printList( os, indent + 4 ); 362 os << string( indent +2, ' ' );362 os << string( indent + 2, ' ' ); 363 363 } // if 364 364 if ( base ) { … … 370 370 os << DeclarationNode::typeClassName[ variable->tyClass ] << " variable "; 371 371 if ( variable->assertions ) { 372 os << endl << string( indent +2, ' ' ) << "with assertions" << endl;372 os << endl << string( indent + 2, ' ' ) << "with assertions" << endl; 373 373 variable->assertions->printList( os, indent + 4 ); 374 os << string( indent +2, ' ' );374 os << string( indent + 2, ' ' ); 375 375 } // if 376 376 break; … … 405 405 switch ( kind ) { 406 406 case Aggregate: 407 if ( ! toplevel && aggregate-> members ) {407 if ( ! toplevel && aggregate->fields ) { 408 408 ret = clone(); 409 409 ret->qualifiers.clear(); … … 515 515 assert( false ); 516 516 } // switch 517 518 517 return 0; 519 518 } … … 815 814 } // switch 816 815 buildList( aggregate->params, at->get_parameters() ); 817 buildList( aggregate-> members, at->get_members() );816 buildList( aggregate->fields, at->get_members() ); 818 817 819 818 return at;
Note:
See TracChangeset
for help on using the changeset viewer.