Changeset 630a82a for src/SynTree/Expression.cc
- Timestamp:
- Apr 8, 2016, 5:22:29 PM (8 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
r3d9b5da r630a82a 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Dec 09 14:10:29 201513 // Update Count : 3411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 8 17:16:23 2016 13 // Update Count : 40 14 14 // 15 15 … … 22 22 23 23 #include "Type.h" 24 #include "Initializer.h" 24 25 #include "Expression.h" 25 26 #include "Declaration.h" … … 443 444 444 445 446 CompoundLiteralExpr::CompoundLiteralExpr( Type * type, Initializer * initializer ) : type( type ), initializer( initializer ) { 447 add_result( type->clone() ); 448 } 449 450 CompoundLiteralExpr::CompoundLiteralExpr( const CompoundLiteralExpr &other ) : Expression( other ), type( maybeClone( other.type ) ), initializer( maybeClone( other.initializer ) ) {} 451 452 CompoundLiteralExpr::~CompoundLiteralExpr() { 453 delete initializer; 454 delete type; 455 } 456 457 void CompoundLiteralExpr::print( std::ostream &os, int indent ) const { 458 os << "Compound Literal Expression: " << std::endl; 459 if ( type ) type->print( os, indent + 2 ); 460 if ( initializer ) initializer->print( os, indent + 2 ); 461 } 462 445 463 446 464 std::ostream & operator<<( std::ostream & out, Expression * expr ) {
Note: See TracChangeset
for help on using the changeset viewer.