Changeset a2dbad10
- Timestamp:
- Sep 21, 2017, 11:29:53 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- aaa4f93
- Parents:
- 6ae8c92
- Location:
- src/SynTree
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/CompoundStmt.cc
r6ae8c92 ra2dbad10 29 29 30 30 CompoundStmt::CompoundStmt( std::list<Label> labels ) : Statement( labels ) { 31 } 32 33 CompoundStmt::CompoundStmt( std::list<Statement *> stmts ) : Statement( noLabels ), kids( stmts ) { 31 34 } 32 35 -
src/SynTree/Constant.cc
r6ae8c92 ra2dbad10 32 32 Constant Constant::from_bool( bool b ) { 33 33 return Constant( new BasicType( Type::Qualifiers(), BasicType::Bool ), b ? "1" : "0" , (unsigned long long int)b ); 34 } 35 36 Constant Constant::from_char( char c ) { 37 return Constant( new BasicType( Type::Qualifiers(), BasicType::Char ), std::to_string( c ), (unsigned long long int)c ); 34 38 } 35 39 -
src/SynTree/Constant.h
r6ae8c92 ra2dbad10 40 40 /// generates a boolean constant of the given bool 41 41 static Constant from_bool( bool b ); 42 /// generates a char constant of the given char 43 static Constant from_char( char c ); 42 44 /// generates an integer constant of the given int 43 45 static Constant from_int( int i ); -
src/SynTree/Statement.h
r6ae8c92 ra2dbad10 54 54 55 55 CompoundStmt( std::list<Label> labels ); 56 CompoundStmt( std::list<Statement *> stmts ); 56 57 CompoundStmt( const CompoundStmt &other ); 57 58 virtual ~CompoundStmt();
Note: See TracChangeset
for help on using the changeset viewer.