Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r630a82a r2a4b088  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Expression.cc --
     7// Expression.cc -- 
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr  8 17:16:23 2016
    13 // Update Count     : 40
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Dec 09 14:10:29 2015
     13// Update Count     : 34
    1414//
    1515
     
    2222
    2323#include "Type.h"
    24 #include "Initializer.h"
    2524#include "Expression.h"
    2625#include "Declaration.h"
     
    423422}
    424423
    425 AsmExpr::AsmExpr( const AsmExpr & other ) : inout( maybeClone( other.inout ) ), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {}
    426 
    427 
    428424void AsmExpr::print( std::ostream &os, int indent ) const {
    429425        os << "Asm Expression: " << std::endl;
     
    433429}
    434430
    435 UntypedValofExpr::UntypedValofExpr( const UntypedValofExpr & other ) : Expression( other ), body ( maybeClone( other.body ) ) {}
    436 
    437 UntypedValofExpr::~UntypedValofExpr() { delete body; }
    438 
    439431void UntypedValofExpr::print( std::ostream &os, int indent ) const {
    440432        os << std::string( indent, ' ' ) << "Valof Expression: " << std::endl;
     
    442434                get_body()->print( os, indent + 2 );
    443435}
    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 
    463436
    464437std::ostream & operator<<( std::ostream & out, Expression * expr ) {
Note: See TracChangeset for help on using the changeset viewer.