Changeset bdd516a for translator/Parser/DeclarationNode.cc
- Timestamp:
- Apr 28, 2015, 4:21:36 PM (9 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:
- 42e2ad7
- Parents:
- ad17ba6a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Parser/DeclarationNode.cc
rad17ba6a rbdd516a 5 5 #include <cassert> 6 6 7 #include "ParseNode.h"8 7 #include "TypeData.h" 9 #include "utility.h"10 #include "SynTree/Declaration.h"11 8 #include "SynTree/Expression.h" 12 #include "SynTree/Initializer.h" 13 #include "SemanticError.h" 14 #include "UniqueName.h" 15 #include "LinkageSpec.h" 9 16 10 17 11 using namespace std; 18 12 19 / * these must remain in the same order as the corresponding DeclarationNode enumerations */20 const char *DeclarationNode::qualifierName[] = { "const", "restrict", "volatile", "lvalue" };13 // These must remain in the same order as the corresponding DeclarationNode enumerations. 14 const char *DeclarationNode::qualifierName[] = { "const", "restrict", "volatile", "lvalue", "_Atomic" }; 21 15 const char *DeclarationNode::basicTypeName[] = { "char", "int", "float", "double", "void", "_Bool", "_Complex", "_Imaginary" }; 22 16 const char *DeclarationNode::modifierName[] = { "signed", "unsigned", "short", "long" }; … … 67 61 os << string(indent, ' ' ); 68 62 if ( name == "" ) { 69 /// os << "An unnamed";63 os << "unnamed: "; 70 64 } else { 71 os << name << ": a";65 os << name << ": "; 72 66 } 73 67 … … 862 856 ret = new StructInstType( type->buildQualifiers(), type->aggregate->name ); 863 857 break; 864 865 858 case DeclarationNode::Union: 866 859 ret = new UnionInstType( type->buildQualifiers(), type->aggregate->name ); 867 860 break; 868 869 861 case DeclarationNode::Context: 870 862 ret = new ContextInstType( type->buildQualifiers(), type->aggregate->name ); 871 863 break; 872 873 864 default: 874 865 assert( false ); 875 } 866 } // switch 876 867 buildList( type->aggregate->actuals, ret->get_parameters() ); 877 868 return ret; … … 884 875 default: 885 876 return type->build(); 886 } 877 } // switch 887 878 } 888 879
Note: See TracChangeset
for help on using the changeset viewer.