Changeset 0f9e4403 for src/SynTree/Constant.cc
- Timestamp:
- Apr 15, 2016, 12:03:11 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 29ad0ac
- Parents:
- c5833e8 (diff), 37f0da8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Constant.cc
rc5833e8 r0f9e4403 16 16 #include <iostream> 17 17 #include <list> 18 #include <string> 18 19 19 20 #include "Constant.h" … … 28 29 29 30 Constant::~Constant() { delete type; } 31 32 Constant Constant::from( int i ) { 33 return Constant( new BasicType( Type::Qualifiers(), BasicType::SignedInt ), std::to_string( i ) ); 34 } 35 36 Constant Constant::from( unsigned long i ) { 37 return Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), std::to_string( i ) ); 38 } 39 40 Constant Constant::from( double d ) { 41 return Constant( new BasicType( Type::Qualifiers(), BasicType::Double ), std::to_string( d ) ); 42 } 30 43 31 44 Constant *Constant::clone() const { assert( false ); return 0; }
Note:
See TracChangeset
for help on using the changeset viewer.