source: translator/SynTree/TypeofType.cc@ 643a2e1

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors ctor deferred_resn demangler enum forall-pointer-decay gc_noraii jacob/cs343-translation jenkins-sandbox memory new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new string with_gc
Last change on this file since 643a2e1 was 51b73452, checked in by Peter A. Buhr <pabuhr@…>, 11 years ago

initial commit

  • Property mode set to 100644
File size: 632 bytes
Line 
1/*
2 * This file is part of the Cforall project
3 *
4 * $Id: TypeofType.cc,v 1.3 2005/08/29 20:59:27 rcbilson Exp $
5 *
6 */
7
8#include "Type.h"
9#include "Expression.h"
10#include "utility.h"
11
12
13TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr )
14 : Type( tq ), expr( expr )
15{
16}
17
18TypeofType::TypeofType( const TypeofType &other )
19 : Type( other ), expr( maybeClone( other.expr ) )
20{
21}
22
23TypeofType::~TypeofType()
24{
25 delete expr;
26}
27
28void
29TypeofType::print( std::ostream &os, int indent ) const
30{
31 Type::print( os, indent );
32 os << "type-of expression ";
33 if( expr ) {
34 expr->print( os, indent );
35 }
36}
37
Note: See TracBrowser for help on using the repository browser.