Changeset 7a780ad for src/Validate


Ignore:
Timestamp:
Apr 18, 2024, 5:19:17 PM (7 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
38093ae
Parents:
60c5b6d
Message:

Moved ast::BasicType::Kind to ast::BasicKind? in its own hearder. This is more consistent with other utility enums (although we still use this as a enum class) and reduces what some files need to include. Also did a upgrade in a comment with MAX_INTEGER_TYPE, it is now part of the enum.

Location:
src/Validate
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/GenericParameter.cpp

    r60c5b6d r7a780ad  
    289289                return new ast::TypeExpr( expr->location,
    290290                        new ast::ArrayType(
    291                                 new ast::BasicType( ast::BasicType::Char ),
     291                                new ast::BasicType( ast::BasicKind::Char ),
    292292                                expr,
    293293                                ast::VariableLen,
  • src/Validate/ImplementEnumFunc.cpp

    r60c5b6d r7a780ad  
    311311        {new ast::ObjectDecl(
    312312            getLocation(), "_ret",
    313             new ast::PointerType(new ast::BasicType{ast::BasicType::Char}))});
     313            new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}))});
    314314}
    315315
     
    364364        attr == ast::EnumAttribute::Value
    365365            ? decl->base
    366             : new ast::PointerType(new ast::BasicType{ast::BasicType::Char}),
     366            : new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}),
    367367        ast::ConstantExpr::from_int(decl->location, decl->members.size()),
    368368        ast::LengthFlag::FixedLen, ast::DimensionFlag::DynamicDim);
  • src/Validate/ReplaceTypedef.cpp

    r60c5b6d r7a780ad  
    349349                // Perhaps this should be a warning instead.
    350350                translationUnit.global.sizeType =
    351                         new ast::BasicType( ast::BasicType::LongUnsignedInt );
     351                        new ast::BasicType( ast::BasicKind::LongUnsignedInt );
    352352        }
    353353}
Note: See TracChangeset for help on using the changeset viewer.