Ignore:
Timestamp:
Apr 8, 2016, 5:22:29 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, string, with_gc
Children:
3da470c
Parents:
3d9b5da
Message:

C99 compound literals now work, comment rational code, clean up hoisting AddVisit?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r3d9b5da r630a82a  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Dec 09 14:10:21 2015
    13 // Update Count     : 19
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Apr  8 17:18:06 2016
     13// Update Count     : 21
    1414//
    1515
     
    557557};
    558558
     559/// CompoundLiteralExpr represents a C99 'compound literal'
     560class CompoundLiteralExpr : public Expression {
     561  public:
     562        CompoundLiteralExpr( Type * type, Initializer * initializer );
     563        CompoundLiteralExpr( const CompoundLiteralExpr &other );
     564        ~CompoundLiteralExpr();
     565
     566        Type * get_type() const { return type; }
     567        void set_type( Type * t ) { type = t; }
     568
     569        Initializer * get_initializer() const { return initializer; }
     570        void set_initializer( Initializer * i ) { initializer = i; }
     571
     572        virtual CompoundLiteralExpr *clone() const { return new CompoundLiteralExpr( *this ); }
     573        virtual void accept( Visitor &v ) { v.visit( this ); }
     574        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     575        virtual void print( std::ostream &os, int indent = 0 ) const;
     576  private:
     577        Type * type;
     578        Initializer * initializer;
     579};
     580
    559581std::ostream & operator<<( std::ostream & out, Expression * expr );
    560582
Note: See TracChangeset for help on using the changeset viewer.