Changes in src/SynTree/Expression.cc [d0d9610:baf7fee]
- File:
-
- 1 edited
-
src/SynTree/Expression.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
rd0d9610 rbaf7fee 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Sep 02 12:07:10201513 // Update Count : 3 312 // Last Modified On : Wed Dec 09 14:10:29 2015 13 // Update Count : 34 14 14 // 15 15 … … 122 122 void SizeofExpr::print( std::ostream &os, int indent) const { 123 123 os << std::string( indent, ' ' ) << "Sizeof Expression on: "; 124 125 if (isType) 126 type->print(os, indent + 2); 127 else 128 expr->print(os, indent + 2); 129 130 os << std::endl; 131 Expression::print( os, indent ); 132 } 133 134 AlignofExpr::AlignofExpr( Expression *expr_, Expression *_aname ) : 135 Expression( _aname ), expr(expr_), type(0), isType(false) { 136 add_result( new BasicType( Type::Qualifiers(), BasicType::UnsignedInt ) ); 137 } 138 139 AlignofExpr::AlignofExpr( Type *type_, Expression *_aname ) : 140 Expression( _aname ), expr(0), type(type_), isType(true) { 141 add_result( new BasicType( Type::Qualifiers(), BasicType::UnsignedInt ) ); 142 } 143 144 AlignofExpr::AlignofExpr( const AlignofExpr &other ) : 145 Expression( other ), expr( maybeClone( other.expr ) ), type( maybeClone( other.type ) ), isType( other.isType ) { 146 } 147 148 AlignofExpr::~AlignofExpr() { 149 delete expr; 150 delete type; 151 } 152 153 void AlignofExpr::print( std::ostream &os, int indent) const { 154 os << std::string( indent, ' ' ) << "Alignof Expression on: "; 124 155 125 156 if (isType) … … 345 376 } 346 377 378 std::ostream & operator<<( std::ostream & out, Expression * expr ) { 379 expr->print( out ); 380 return out; 381 } 382 347 383 // Local Variables: // 348 384 // tab-width: 4 //
Note:
See TracChangeset
for help on using the changeset viewer.