Changes in src/Parser/TypeData.cc [8f91c9ae:f7e4db27]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r8f91c9ae rf7e4db27 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 12 13:52:09201813 // Update Count : 6 0612 // Last Modified On : Fri Jul 20 14:39:31 2018 13 // Update Count : 622 14 14 // 15 15 … … 76 76 aggregate.parent = nullptr; 77 77 aggregate.anon = false; 78 aggregate.inLine = false;79 78 break; 80 79 case AggregateInst: … … 83 82 aggInst.params = nullptr; 84 83 aggInst.hoistType = false; 85 aggInst.inLine = false;86 84 break; 87 85 case Symbolic: … … 221 219 newtype->aggregate.body = aggregate.body; 222 220 newtype->aggregate.anon = aggregate.anon; 223 newtype->aggregate.inLine = aggregate.inLine;224 221 newtype->aggregate.tagged = aggregate.tagged; 225 222 newtype->aggregate.parent = aggregate.parent ? new string( *aggregate.parent ) : nullptr; … … 229 226 newtype->aggInst.params = maybeClone( aggInst.params ); 230 227 newtype->aggInst.hoistType = aggInst.hoistType; 231 newtype->aggInst.inLine = aggInst.inLine;232 228 break; 233 229 case Enum: … … 275 271 276 272 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 279 284 break; 280 285 case Pointer: … … 285 290 } // if 286 291 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 296 298 break; 297 299 case Array: … … 379 381 } // if 380 382 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 "; 387 385 break; 388 386 case Symbolic: … … 406 404 } // if 407 405 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; 408 414 case Tuple: 409 415 os << "tuple "; … … 421 427 case Builtin: 422 428 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 "; 423 439 break; 424 440 default:
Note: See TracChangeset
for help on using the changeset viewer.