Changeset 90e683b for src/Validate


Ignore:
Timestamp:
Feb 3, 2025, 11:46:55 AM (8 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
54f70c6
Parents:
bbbff10
Message:

I set out to do a enum rework. It ended up being much the same and I unwound the core rework. But I hope the new names are a bit clearer and other minor fixes are helpful, so I am keeping those.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/ImplementEnumFunc.cpp

    rbbbff10 r90e683b  
    6161        ast::FunctionDecl* genLabelProto() const;
    6262        ast::FunctionDecl* genValueProto() const;
    63         ast::FunctionDecl* genQuasiValueProto() const;
    6463        ast::FunctionDecl* genTypeNameProto() const;
    6564
     
    206205
    207206ast::FunctionDecl* EnumAttrFuncGenerator::genValueProto() const {
    208         assert (decl->isTyped());
     207        assert( decl->is_typed_enum() );
    209208        return genProto(
    210209                "value",
     
    414413void EnumAttrFuncGenerator::genTypedEnumFunction(const ast::EnumAttribute attr) {
    415414        if (attr == ast::EnumAttribute::Value) {
    416                 if ( !decl->isTyped() ) return;
     415                if ( !decl->is_typed_enum() ) return;
    417416                std::vector<ast::ptr<ast::Init>> inits = genValueInit();
    418417                ast::ObjectDecl* arrayProto =
     
    483482
    484483void ImplementEnumFunc::previsit(const ast::EnumDecl* enumDecl) {
    485         if (!enumDecl->body || !enumDecl->isCfa) return;
     484        if ( !enumDecl->body || enumDecl->is_c_enum() ) return;
    486485        ast::EnumInstType enumInst(enumDecl->name);
    487486        enumInst.base = enumDecl;
Note: See TracChangeset for help on using the changeset viewer.