Changeset 906e24d for src/SynTree/Type.h


Ignore:
Timestamp:
Sep 15, 2016, 10:17:16 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
aa8f9df
Parents:
96a10cd
git-author:
Rob Schluntz <rschlunt@…> (09/14/16 22:32:34)
git-committer:
Rob Schluntz <rschlunt@…> (09/15/16 10:17:16)
Message:

replace results list on Expressions with a single Type field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Type.h

    r96a10cd r906e24d  
    6565        std::list<TypeDecl*>& get_forall() { return forall; }
    6666
     67        /// How many elemental types are represented by this type
     68        virtual unsigned size() const { return 1; };
     69        virtual bool isVoid() const { return size() == 0; }
     70
    6771        virtual Type *clone() const = 0;
    6872        virtual void accept( Visitor &v ) = 0;
     
    7781  public:
    7882        VoidType( const Type::Qualifiers &tq );
     83
     84        virtual unsigned size() const { return 0; };
    7985
    8086        virtual VoidType *clone() const { return new VoidType( *this ); }
     
    353359
    354360        std::list<Type*>& get_types() { return types; }
     361        virtual unsigned size() const { return types.size(); };
    355362
    356363        virtual TupleType *clone() const { return new TupleType( *this ); }
Note: See TracChangeset for help on using the changeset viewer.