Changeset 561354f for src/CodeGen
- Timestamp:
- May 17, 2023, 1:33:39 AM (2 years ago)
- Branches:
- ADT
- Children:
- d6c464d
- Parents:
- 28f8f15
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r28f8f15 r561354f 296 296 297 297 void CodeGenerator::handleData( EnumDecl * dataDecl ) { 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->tags ); 306 output << ";" << endl; 307 postvisit( dataDecl->tag_union ); 308 output << ";" << endl; 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 assert(false); 309 310 } 310 311 311 312 void CodeGenerator::postvisit( EnumDecl * enumDecl ) { 312 if ( enumDecl->data_constructors.size() > 0 ) return handleData( enumDecl );313 // if ( enumDecl->data_constructors.size() > 0 ) return handleData( enumDecl ); 313 314 extension( enumDecl ); 314 315 std::list< Declaration* > &memb = enumDecl->get_members();
Note:
See TracChangeset
for help on using the changeset viewer.