Changeset fb24492 for src/SynTree
- Timestamp:
- May 12, 2016, 1:19:59 PM (8 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:
- 03286aa, 7b3f66b
- Parents:
- ec79847 (diff), 228851d (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. - Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Constant.cc
rec79847 rfb24492 30 30 Constant::~Constant() { delete type; } 31 31 32 Constant Constant::from ( int i ) {32 Constant Constant::from_int( int i ) { 33 33 return Constant( new BasicType( Type::Qualifiers(), BasicType::SignedInt ), std::to_string( i ) ); 34 34 } 35 35 36 Constant Constant::from ( unsigned long i ) {36 Constant Constant::from_ulong( unsigned long i ) { 37 37 return Constant( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), std::to_string( i ) ); 38 38 } 39 39 40 Constant Constant::from ( double d ) {40 Constant Constant::from_double( double d ) { 41 41 return Constant( new BasicType( Type::Qualifiers(), BasicType::Double ), std::to_string( d ) ); 42 42 } -
src/SynTree/Constant.h
rec79847 rfb24492 33 33 34 34 /// generates an integer constant of the given int 35 static Constant from ( int i );35 static Constant from_int( int i ); 36 36 /// generates an integer constant of the given unsigned long int 37 static Constant from ( unsigned long i );37 static Constant from_ulong( unsigned long i ); 38 38 /// generates a floating point constant of the given double 39 static Constant from ( double d );39 static Constant from_double( double d ); 40 40 41 41 virtual Constant *clone() const;
Note: See TracChangeset
for help on using the changeset viewer.