Changeset 5bb1ac1
- Timestamp:
- Apr 10, 2022, 11:03:20 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 7ee5d6d
- Parents:
- d8e2a09
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/ResolvExpr/Resolver.cc ¶
rd8e2a09 r5bb1ac1 1478 1478 1479 1479 if (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base) { // const ast::PointerType & 1480 // const ast::Type * enumBase = (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base.get()); 1481 // const ast::PointerType * enumBaseAsPtr = dynamic_cast<const ast::PointerType *>(enumBase); 1482 1483 // if ( enumBaseAsPtr ) { 1484 // const ast::Type * pointerBase = enumBaseAsPtr->base.get(); 1485 // if ( dynamic_cast<const ast::BasicType *>(pointerBase) ) { 1486 // objectDecl = fixObjectType(objectDecl, context); 1487 // if (dynamic_cast<const ast::BasicType *>(pointerBase)->kind == ast::BasicType::Char) 1488 // currentObject = ast::CurrentObject{ 1489 // objectDecl->location, new ast::PointerType{ 1490 // new ast::BasicType{ ast::BasicType::Char } 1491 // } }; 1492 // } else { 1493 // objectDecl = fixObjectType(objectDecl, context); 1494 // currentObject = ast::CurrentObject{objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } }; 1495 // } 1496 // } 1497 objectDecl = fixObjectType( objectDecl, context ); 1480 1498 const ast::Type * enumBase = (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base.get()); 1481 const ast::PointerType * enumBaseAsPtr = dynamic_cast<const ast::PointerType *>(enumBase); 1482 1483 if ( enumBaseAsPtr ) { 1484 const ast::Type * pointerBase = enumBaseAsPtr->base.get(); 1485 if ( dynamic_cast<const ast::BasicType *>(pointerBase) ) { 1486 objectDecl = fixObjectType(objectDecl, context); 1487 if (dynamic_cast<const ast::BasicType *>(pointerBase)->kind == ast::BasicType::Char) 1488 currentObject = ast::CurrentObject{ 1489 objectDecl->location, new ast::PointerType{ 1490 new ast::BasicType{ ast::BasicType::Char } 1491 } }; 1492 } else { 1493 objectDecl = fixObjectType(objectDecl, context); 1494 currentObject = ast::CurrentObject{objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } }; 1495 } 1496 } 1499 currentObject = ast::CurrentObject{ 1500 objectDecl->location, 1501 enumBase 1502 }; 1497 1503 } else { 1498 objectDecl = fixObjectType( objectDecl, context);1504 objectDecl = fixObjectType( objectDecl, context ); 1499 1505 currentObject = ast::CurrentObject{ 1500 1506 objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } };
Note: See TracChangeset
for help on using the changeset viewer.