- Timestamp:
- Jul 5, 2024, 10:12:51 AM (6 months ago)
- Branches:
- master
- Children:
- c2cf2d0
- Parents:
- 99f7f37
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.cpp
r99f7f37 r8c55d34 205 205 bool EnumDecl::isTyped() const { return base; } 206 206 207 bool EnumDecl::isOpague() const { return isCfa && !isTyped(); } 207 bool EnumDecl::isOpaque() const { return isCfa && !isTyped(); } 208 208 209 } 209 210 -
src/AST/Decl.hpp
r99f7f37 r8c55d34 311 311 // enum (type_optional) Name {...} 312 312 bool isCfa; 313 // if isCfa == true && base.get() == nullptr, it is a "opa gue" enum313 // if isCfa == true && base.get() == nullptr, it is a "opaque" enum 314 314 ptr<Type> base; 315 315 enum class EnumHiding { Visible, Hide } hide; … … 337 337 bool isSubTypeOf(const ast::EnumDecl *) const; 338 338 bool isTyped() const; 339 bool isOpa gue() const;339 bool isOpaque() const; 340 340 private: 341 341 EnumDecl * clone() const override { return new EnumDecl{ *this }; } -
src/Parser/TypeData.cpp
r99f7f37 r8c55d34 1471 1471 ast::ObjectDecl * object = strict_dynamic_cast<ast::ObjectDecl *>( member ); 1472 1472 object->isHidden = ast::EnumDecl::EnumHiding::Hide == ret->hide; 1473 if ( ret->isOpa gue() && cur->has_enumeratorValue() ) {1473 if ( ret->isOpaque() && cur->has_enumeratorValue() ) { 1474 1474 SemanticError( td->location, "Opague cannot have an explicit initializer value." ); 1475 1475 } else if ( cur->has_enumeratorValue() ) { … … 1479 1479 ast::NoConstruct 1480 1480 ); 1481 } 1481 } 1482 1482 // else cur is a List Initializer and has been set as init in buildList() 1483 1483 // if
Note: See TracChangeset
for help on using the changeset viewer.