/* * This file is part of the Cforall project * * $Id: TypeofType.cc,v 1.3 2005/08/29 20:59:27 rcbilson Exp $ * */ #include "Type.h" #include "Expression.h" #include "utility.h" TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr ) : Type( tq ), expr( expr ) { } TypeofType::TypeofType( const TypeofType &other ) : Type( other ), expr( maybeClone( other.expr ) ) { } TypeofType::~TypeofType() { delete expr; } void TypeofType::print( std::ostream &os, int indent ) const { Type::print( os, indent ); os << "type-of expression "; if( expr ) { expr->print( os, indent ); } }