Ignore:
Timestamp:
Jun 29, 2017, 5:06:24 PM (7 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:
a12d5aa
Parents:
bb1cd95
Message:

Big push on designations and initialization: works with generic types, tuples, arrays, tests pass.
Refactor guard_value_impl.
Add list of declarations to TupleType?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Type.h

    rbb1cd95 r62423350  
    481481class TupleType : public Type {
    482482  public:
    483         TupleType( const Type::Qualifiers & tq, const std::list< Type * > & types = std::list< Type * >(), const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     483        TupleType( const Type::Qualifiers & tq, const std::list< Type * > & types, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    484484        TupleType( const TupleType& );
    485485        virtual ~TupleType();
     
    488488        typedef value_type::iterator iterator;
    489489
    490         std::list<Type*>& get_types() { return types; }
     490        std::list<Type *> & get_types() { return types; }
    491491        virtual unsigned size() const { return types.size(); };
     492
     493        // For now, this is entirely synthetic -- tuple types always have unnamed members.
     494        // Eventually, we may allow named tuples, in which case members should subsume types
     495        std::list<Declaration *> & get_members() { return members; }
    492496
    493497        iterator begin() { return types.begin(); }
     
    506510        virtual void print( std::ostream & os, int indent = 0 ) const;
    507511  private:
    508         std::list<Type*> types;
     512        std::list<Type *> types;
     513        std::list<Declaration *> members;
    509514};
    510515
Note: See TracChangeset for help on using the changeset viewer.