ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 0b8cd722 was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
388 bytes
|
Rev | Line | |
---|
[51b7345] | 1 | #include <iostream> |
---|
| 2 | #include <list> |
---|
| 3 | |
---|
| 4 | #include "Constant.h" |
---|
| 5 | #include "Type.h" |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | Constant::Constant(Type *_type, std::string _value): |
---|
| 9 | type(_type), value(_value) {} |
---|
| 10 | |
---|
| 11 | Constant::~Constant() {} |
---|
| 12 | |
---|
| 13 | Constant *Constant::clone() const { return 0; } |
---|
| 14 | |
---|
| 15 | void Constant::print( std::ostream &os ) const { |
---|
| 16 | os << value; |
---|
| 17 | if( type ) { |
---|
| 18 | os << " (type: "; |
---|
| 19 | type->print( os ); |
---|
| 20 | os << ")"; |
---|
| 21 | } |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | |
---|
Note: See
TracBrowser
for help on using the repository browser.