Changeset 67a67af for src/ResolvExpr
- Timestamp:
- Aug 11, 2017, 10:55:14 AM (8 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:
- 03321e4, f196351
- Parents:
- 3b4571b (diff), 54cd58b0 (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/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CurrentObject.cc
r3b4571b r67a67af 19 19 #include "CurrentObject.h" 20 20 21 #include "Common/Indenter.h" 22 21 23 #include "SynTree/Declaration.h" 22 24 #include "SynTree/Initializer.h" … … 45 47 assertf( false, "unhandled type on getConstValue %s", toString( constExpr->get_result() ).c_str() ); // xxx - might be semantic error 46 48 } 47 }48 49 struct Indenter {50 static const int amt = 2;51 unsigned int indent = 0;52 53 Indenter & operator+=(int nlevels) { indent += amt*nlevels; return *this; }54 Indenter & operator-=(int nlevels) { indent -= amt*nlevels; return *this; }55 Indenter operator+(int nlevels) { Indenter indenter = *this; return indenter += nlevels; }56 Indenter operator-(int nlevels) { Indenter indenter = *this; return indenter -= nlevels; }57 Indenter & operator++() { return *this += 1; }58 Indenter & operator--() { return *this -= 1; }59 };60 std::ostream & operator<<( std::ostream & out, Indenter & indent ) {61 return out << std::string(indent.indent, ' ');62 49 } 63 50 -
src/ResolvExpr/CurrentObject.h
r3b4571b r67a67af 24 24 class MemberIterator; 25 25 26 // TODO: memory management of MemberIterators 26 27 class CurrentObject { 27 28 public:
Note:
See TracChangeset
for help on using the changeset viewer.