Ignore:
Timestamp:
Apr 14, 2016, 4:13:10 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, with_gc
Children:
356189a
Parents:
db4ecc5 (diff), 37f0da8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ctor

Conflicts:

src/CodeGen/CodeGenerator.cc
src/GenPoly/Box.cc
src/Parser/DeclarationNode.cc
src/Parser/ParseNode.h
src/Parser/parser.cc
src/Parser/parser.yy
src/SymTab/AddVisit.h
src/SymTab/Validate.cc
src/SynTree/Expression.cc
src/SynTree/Expression.h
src/SynTree/Mutator.cc
src/SynTree/Mutator.h
src/SynTree/SynTree.h
src/SynTree/Visitor.cc
src/SynTree/Visitor.h
src/libcfa/iostream.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    rdb4ecc5 r70a06f6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Apr 14 12:04:58 2016
    13 // Update Count     : 19
     12// Last Modified On : Thu Apr 14 15:40:56 2016
     13// Update Count     : 21
    1414//
    1515
     
    363363};
    364364
     365/// Expression representing a pack of field-offsets for a generic type
     366class OffsetPackExpr : public Expression {
     367public:
     368        OffsetPackExpr( StructInstType *type_, Expression *aname_ = 0 );
     369        OffsetPackExpr( const OffsetPackExpr &other );
     370        virtual ~OffsetPackExpr();
     371
     372        StructInstType *get_type() const { return type; }
     373        void set_type( StructInstType *newValue ) { type = newValue; }
     374
     375        virtual OffsetPackExpr *clone() const { return new OffsetPackExpr( *this ); }
     376        virtual void accept( Visitor &v ) { v.visit( this ); }
     377        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     378
     379        virtual void print( std::ostream &os, int indent = 0 ) const;
     380
     381private:
     382        StructInstType *type;
     383};
     384
    365385/// AttrExpr represents an @attribute expression (like sizeof, but user-defined)
    366386class AttrExpr : public Expression {
     
    593613};
    594614
     615/// CompoundLiteralExpr represents a C99 'compound literal'
     616class CompoundLiteralExpr : public Expression {
     617  public:
     618        CompoundLiteralExpr( Type * type, Initializer * initializer );
     619        CompoundLiteralExpr( const CompoundLiteralExpr &other );
     620        ~CompoundLiteralExpr();
     621
     622        Type * get_type() const { return type; }
     623        void set_type( Type * t ) { type = t; }
     624
     625        Initializer * get_initializer() const { return initializer; }
     626        void set_initializer( Initializer * i ) { initializer = i; }
     627
     628        virtual CompoundLiteralExpr *clone() const { return new CompoundLiteralExpr( *this ); }
     629        virtual void accept( Visitor &v ) { v.visit( this ); }
     630        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     631        virtual void print( std::ostream &os, int indent = 0 ) const;
     632  private:
     633        Type * type;
     634        Initializer * initializer;
     635};
     636
    595637std::ostream & operator<<( std::ostream & out, Expression * expr );
    596638
Note: See TracChangeset for help on using the changeset viewer.