Changeset f7cb0bc for src/ResolvExpr
- Timestamp:
- Jun 30, 2017, 4:59:54 PM (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:
- a5de33e, b1e63ac5
- Parents:
- 435e75f
- git-author:
- Rob Schluntz <rschlunt@…> (06/30/17 16:55:23)
- git-committer:
- Rob Schluntz <rschlunt@…> (06/30/17 16:59:54)
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CurrentObject.cc
r435e75f rf7cb0bc 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
r435e75f rf7cb0bc 25 25 class MemberIterator; 26 26 27 // TODO: memory management of MemberIterators 27 28 class CurrentObject { 28 29 public:
Note: See TracChangeset
for help on using the changeset viewer.