Ignore:
Timestamp:
Oct 18, 2022, 5:48:13 PM (22 months ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master
Children:
5408b59
Parents:
a55472cc
Message:

Supports inline enums

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    ra55472cc r1e30df7  
    924924        list< Declaration * >::iterator members = ret->get_members().begin();
    925925        for ( const DeclarationNode * cur = td->enumeration.constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {
     926                if ( cur->enumInLine ) {
     927                        // Tell the compiler this is a inline value placeholder
     928                        ObjectDecl * member = dynamic_cast< ObjectDecl* >(* members);
     929                        member->enumInLine = true;
     930                }
    926931                if ( ret->isTyped && !ret->base && cur->has_enumeratorValue() ) {
    927932                        SemanticError( td->location, "Enumerator of enum(void) cannot have an explicit initializer value." );
Note: See TracChangeset for help on using the changeset viewer.