Changeset fa2c005 for src/CodeGen
- Timestamp:
- Jun 8, 2023, 3:19:43 PM (3 years ago)
- Branches:
- ADT
- Parents:
- 044ae62
- File:
-
- 1 edited
-
src/CodeGen/CodeGenerator.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r044ae62 rfa2c005 296 296 297 297 void CodeGenerator::handleData( EnumDecl * ) { 298 // output << " /** data type */" << endl;299 // for ( StructDecl * decl : dataDecl->data_constructors ) {300 // postvisit(decl);301 // output << ";" << endl;302 // }303 // postvisit( dataDecl->data_union );304 // output << ";" << endl;305 // postvisit( dataDecl->tag );306 // output << ";" << endl;307 // postvisit( dataDecl->tag_union );308 // output << ";" << endl;309 298 assert(false); 310 299 } 311 300 312 301 void CodeGenerator::postvisit( EnumDecl * enumDecl ) { 313 // if ( enumDecl->data_constructors.size() > 0 ) return handleData( enumDecl );314 302 extension( enumDecl ); 315 303 std::list< Declaration* > &memb = enumDecl->get_members(); … … 350 338 } 351 339 352 void CodeGenerator::postvisit( AdtDecl * ) { 353 // TODO 340 // Temporary fix, But visitor should be able to handle this 341 void CodeGenerator::postvisit( AdtDecl * adtDecl ) { 342 output << endl << "/* AdtDecl Code Section */" << endl; 343 postvisit( adtDecl->tag ); 344 output << ";" << endl; 345 postvisit( adtDecl->data_union ); 346 output << ";" << endl; 347 postvisit( adtDecl->tag_union ); 354 348 } 355 349
Note:
See TracChangeset
for help on using the changeset viewer.