source: translator/SynTree/Constant.cc @ 9df2dd5

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 9df2dd5 was 51b7345, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

initial commit

  • Property mode set to 100644
File size: 388 bytes
Line 
1#include <iostream>
2#include <list>
3
4#include "Constant.h"
5#include "Type.h"
6
7
8Constant::Constant(Type *_type, std::string _value):
9    type(_type), value(_value) {}
10
11Constant::~Constant() {}
12
13Constant *Constant::clone() const { return 0; }
14
15void 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.