Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r8f60f0b r58dd019  
    179179        typedef NamedTypeDecl Parent;
    180180  public:
    181         enum Kind { Any, Dtype, Ftype, Ttype };
    182         /// Data extracted from a type decl
    183         struct Data {
    184                 TypeDecl::Kind kind;
    185                 bool isComplete;
    186                 Data() : kind( (TypeDecl::Kind)-1 ), isComplete( false ) {}
    187                 Data( TypeDecl * typeDecl ) : Data( typeDecl->get_kind(), typeDecl->isComplete() ) {}
    188                 Data( Kind kind, bool isComplete ) : kind( kind ), isComplete( isComplete ) {}
    189                 bool operator==(const Data & other) const { return kind == other.kind && isComplete == other.isComplete; }
    190                 bool operator!=(const Data & other) const { return !(*this == other);}
    191         };
     181        enum Kind { Any, Dtype, Ftype };
    192182
    193183        TypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type, Kind kind );
     
    196186        Kind get_kind() const { return kind; }
    197187
    198         bool isComplete() const { return kind == Any || sized; }
    199         bool get_sized() const { return sized; }
    200         TypeDecl * set_sized( bool newValue ) { sized = newValue; return this; }
    201 
    202188        virtual TypeDecl *clone() const { return new TypeDecl( *this ); }
    203189        virtual void accept( Visitor &v ) { v.visit( this ); }
     
    206192        virtual std::string typeString() const;
    207193        Kind kind;
    208         bool sized;
    209194};
    210195
     
    299284
    300285std::ostream & operator<<( std::ostream & out, const Declaration * decl );
    301 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data );
    302286
    303287#endif // DECLARATION_H
Note: See TracChangeset for help on using the changeset viewer.