Changeset 17cd4eb for translator/Parser/TypeData.cc
- Timestamp:
- Jan 7, 2015, 6:04:42 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 0b8cd722
- Parents:
- d9a0e76
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Parser/TypeData.cc
rd9a0e76 r17cd4eb 560 560 if ( *i == DeclarationNode::Void ) { 561 561 if ( basic->typeSpec.size() != 1 || !basic->modifiers.empty() ) { 562 throw SemanticError( "invalid type specifier \"void\" in type ", this );562 throw SemanticError( "invalid type specifier \"void\" in type: ", this ); 563 563 } else { 564 564 return new VoidType( buildQualifiers() ); … … 571 571 case DeclarationNode::Float: 572 572 if ( sawDouble ) { 573 throw SemanticError( "invalid type specifier \"float\" in type ", this );573 throw SemanticError( "invalid type specifier \"float\" in type: ", this ); 574 574 } else { 575 575 switch ( ret ) { … … 581 581 break; 582 582 default: 583 throw SemanticError( "invalid type specifier \"float\" in type ", this );583 throw SemanticError( "invalid type specifier \"float\" in type: ", this ); 584 584 } 585 585 } … … 587 587 case DeclarationNode::Double: 588 588 if ( sawDouble ) { 589 throw SemanticError( "duplicate type specifier \"double\" in type ", this );589 throw SemanticError( "duplicate type specifier \"double\" in type: ", this ); 590 590 } else { 591 591 switch ( ret ) { … … 594 594 break; 595 595 default: 596 throw SemanticError( "invalid type specifier \"double\" in type ", this );596 throw SemanticError( "invalid type specifier \"double\" in type: ", this ); 597 597 } 598 598 } … … 609 609 break; 610 610 default: 611 throw SemanticError( "invalid type specifier \" complex\" in type", this );611 throw SemanticError( "invalid type specifier \"_Complex\" in type: ", this ); 612 612 } 613 613 break; … … 623 623 break; 624 624 default: 625 throw SemanticError( "invalid type specifier \" imaginary\" in type", this );625 throw SemanticError( "invalid type specifier \"_Imaginary\" in type: ", this ); 626 626 } 627 627 break; 628 628 629 629 default: 630 throw SemanticError( std::string( "invalid type specifier \"" ) + DeclarationNode::basicTypeName[ *i ] + "\" in type ", this );630 throw SemanticError( std::string( "invalid type specifier \"" ) + DeclarationNode::basicTypeName[ *i ] + "\" in type: ", this ); 631 631 } 632 632 } … … 666 666 break; 667 667 default: 668 throw SemanticError( "invalid type modifier \"long\" in type ", this );668 throw SemanticError( "invalid type modifier \"long\" in type: ", this ); 669 669 } 670 670 } … … 683 683 break; 684 684 default: 685 throw SemanticError( "invalid type modifier \"short\" in type ", this );685 throw SemanticError( "invalid type modifier \"short\" in type: ", this ); 686 686 } 687 687 } … … 692 692 ret = BasicType::SignedInt; 693 693 } else if ( sawSigned ) { 694 throw SemanticError( "duplicate type modifer \"signed\" in type ", this );694 throw SemanticError( "duplicate type modifer \"signed\" in type: ", this ); 695 695 } else { 696 696 switch ( ret ) { … … 702 702 break; 703 703 default: 704 throw SemanticError( "invalid type modifer \"signed\" in type ", this );704 throw SemanticError( "invalid type modifer \"signed\" in type: ", this ); 705 705 } 706 706 } … … 711 711 ret = BasicType::UnsignedInt; 712 712 } else if ( sawSigned ) { 713 throw SemanticError( "invalid type modifer \"unsigned\" in type ", this );713 throw SemanticError( "invalid type modifer \"unsigned\" in type: ", this ); 714 714 } else { 715 715 switch ( ret ) { … … 727 727 break; 728 728 default: 729 throw SemanticError( "invalid type modifer \"unsigned\" in type ", this );729 throw SemanticError( "invalid type modifer \"unsigned\" in type: ", this ); 730 730 } 731 731 }
Note: See TracChangeset
for help on using the changeset viewer.