Changeset 28f8f15 for src/CodeGen
- Timestamp:
- Apr 27, 2023, 3:13:24 PM (2 years ago)
- Branches:
- ADT
- Children:
- 561354f
- Parents:
- b110bcc
- Location:
- src/CodeGen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
rb110bcc r28f8f15 295 295 } 296 296 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; 309 } 310 297 311 void CodeGenerator::postvisit( EnumDecl * enumDecl ) { 298 extension( enumDecl ); 312 if ( enumDecl->data_constructors.size() > 0 ) return handleData( enumDecl ); 313 extension( enumDecl ); 299 314 std::list< Declaration* > &memb = enumDecl->get_members(); 300 315 if (enumDecl->base && ! memb.empty()) { -
src/CodeGen/CodeGenerator.h
rb110bcc r28f8f15 165 165 void handleTypedef( NamedTypeDecl *namedType ); 166 166 std::string mangleName( DeclarationWithType * decl ); 167 168 void handleData( EnumDecl * EnumDecl ); 167 169 }; // CodeGenerator 168 170
Note:
See TracChangeset
for help on using the changeset viewer.