Ignore:
Timestamp:
Sep 12, 2016, 9:52:12 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
101e0bd
Parents:
b6424d9
Message:

more refactoring of parser code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    rb6424d9 r5b639ee  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep 10 17:14:37 2016
    13 // Update Count     : 589
     12// Last Modified On : Mon Sep 12 08:00:05 2016
     13// Update Count     : 603
    1414//
    1515
     
    196196class DeclarationNode : public ParseNode {
    197197  public:
    198         enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic, NoOfQualifier };
     198        // These must remain in the same order as the corresponding DeclarationNode names.
    199199        enum StorageClass { Extern, Static, Auto, Register, Inline, Fortran, Noreturn, Threadlocal, NoStorageClass, };
    200         enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary };
    201         enum Modifier  { Signed, Unsigned, Short, Long };
     200        enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic, NoQualifier };
     201        enum BasicType { Void, Bool, Char, Int, Float, Double, LongDouble, NoBasicType };
     202        enum ComplexType { Complex, Imaginary, NoComplexType };
     203        enum Signedness { Signed, Unsigned, NoSignedness };
     204        enum Length { Short, Long, LongLong, NoLength };
    202205        enum Aggregate { Struct, Union, Trait };
    203         enum TypeClass { Type, Dtype, Ftype };
     206        enum TypeClass { Otype, Dtype, Ftype };
    204207        enum BuiltinType { Valist };
    205208
     209        static const char * storageName[];
    206210        static const char * qualifierName[];
    207         static const char * storageName[];
    208211        static const char * basicTypeName[];
    209         static const char * modifierName[];
     212        static const char * complexTypeName[];
     213        static const char * signednessName[];
     214        static const char * lengthName[];
    210215        static const char * aggregateName[];
    211216        static const char * typeClassName[];
     
    217222        static DeclarationNode * newStorageClass( StorageClass );
    218223        static DeclarationNode * newBasicType( BasicType );
    219         static DeclarationNode * newModifier( Modifier );
     224        static DeclarationNode * newComplexType( ComplexType );
     225        static DeclarationNode * newSignedNess( Signedness sn );
     226        static DeclarationNode * newLength( Length lnth );
    220227        static DeclarationNode * newBuiltinType( BuiltinType );
    221228        static DeclarationNode * newFromTypedef( std::string *);
     
    309316        TypeData * type;
    310317        std::string name;
    311         // std::list< StorageClass > storageClasses;
    312318        StorageClass storageClass;
    313319        bool isInline, isNoreturn;
Note: See TracChangeset for help on using the changeset viewer.