Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    r8f91c9ae rf7e4db27  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 12 13:52:09 2018
    13 // Update Count     : 606
     12// Last Modified On : Fri Jul 20 14:39:31 2018
     13// Update Count     : 622
    1414//
    1515
     
    7676                aggregate.parent = nullptr;
    7777                aggregate.anon = false;
    78                 aggregate.inLine = false;
    7978                break;
    8079          case AggregateInst:
     
    8382                aggInst.params = nullptr;
    8483                aggInst.hoistType = false;
    85                 aggInst.inLine = false;
    8684                break;
    8785          case Symbolic:
     
    221219                newtype->aggregate.body = aggregate.body;
    222220                newtype->aggregate.anon = aggregate.anon;
    223                 newtype->aggregate.inLine = aggregate.inLine;
    224221                newtype->aggregate.tagged = aggregate.tagged;
    225222                newtype->aggregate.parent = aggregate.parent ? new string( *aggregate.parent ) : nullptr;
     
    229226                newtype->aggInst.params = maybeClone( aggInst.params );
    230227                newtype->aggInst.hoistType = aggInst.hoistType;
    231                 newtype->aggInst.inLine = aggInst.inLine;
    232228                break;
    233229          case Enum:
     
    275271
    276272        switch ( kind ) {
    277           case Unknown:
    278                 os << "entity of unknown type ";
     273          case Basic:
     274                if ( signedness != DeclarationNode::NoSignedness ) os << DeclarationNode::signednessNames[ signedness ] << " ";
     275                if ( length != DeclarationNode::NoLength ) os << DeclarationNode::lengthNames[ length ] << " ";
     276                if ( complextype == DeclarationNode::NoComplexType ) { // basic type
     277                        assert( basictype != DeclarationNode::NoBasicType );
     278                        os << DeclarationNode::basicTypeNames[ basictype ] << " ";
     279                } else {                                                                                // complex type
     280                        // handle double _Complex
     281                        if ( basictype != DeclarationNode::NoBasicType ) os << DeclarationNode::basicTypeNames[ basictype ] << " ";
     282                        os << DeclarationNode::complexTypeNames[ complextype ] << " ";
     283                } // if
    279284                break;
    280285          case Pointer:
     
    285290                } // if
    286291                break;
    287           case EnumConstant:
    288                 os << "enumeration constant ";
    289                 break;
    290           case Basic:
    291                 if ( signedness != DeclarationNode::NoSignedness ) os << DeclarationNode::signednessNames[ signedness ] << " ";
    292                 if ( length != DeclarationNode::NoLength ) os << DeclarationNode::lengthNames[ length ] << " ";
    293                 assert( basictype != DeclarationNode::NoBasicType );
    294                 os << DeclarationNode::basicTypeNames[ basictype ] << " ";
    295                 if ( complextype != DeclarationNode::NoComplexType ) os << DeclarationNode::complexTypeNames[ complextype ] << " ";
     292          case Reference:
     293                os << "reference ";
     294                if ( base ) {
     295                        os << "to ";
     296                        base->print( os, indent );
     297                } // if
    296298                break;
    297299          case Array:
     
    379381                } // if
    380382                break;
    381           case SymbolicInst:
    382                 os << "instance of type " << *symbolic.name;
    383                 if ( symbolic.actuals ) {
    384                         os << " with parameters" << endl;
    385                         symbolic.actuals->printList( os, indent + 2 );
    386                 } // if
     383          case EnumConstant:
     384                os << "enumeration constant ";
    387385                break;
    388386          case Symbolic:
     
    406404                } // if
    407405                break;
     406          case SymbolicInst:
     407                os << *symbolic.name;
     408                if ( symbolic.actuals ) {
     409                        os << "(";
     410                        symbolic.actuals->printList( os, indent + 2 );
     411                        os << ")";
     412                } // if
     413                break;
    408414          case Tuple:
    409415                os << "tuple ";
     
    421427          case Builtin:
    422428                os << DeclarationNode::builtinTypeNames[builtintype];
     429                break;
     430          case GlobalScope:
     431                break;
     432          case Qualified:
     433                qualified.parent->print( os );
     434                os << ".";
     435                qualified.child->print( os );
     436                break;
     437          case Unknown:
     438                os << "entity of unknown type ";
    423439                break;
    424440          default:
Note: See TracChangeset for help on using the changeset viewer.