Ignore:
Timestamp:
Aug 11, 2017, 3:54:44 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
f6cc2096
Parents:
0a5b683 (diff), 33c4b81 (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.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CurrentObject.cc

    r0a5b683 r70284830  
    1919#include "CurrentObject.h"
    2020
     21#include "Common/Indenter.h"
     22
    2123#include "SynTree/Declaration.h"
    2224#include "SynTree/Initializer.h"
     
    4547                        assertf( false, "unhandled type on getConstValue %s", toString( constExpr->get_result() ).c_str() ); // xxx - might be semantic error
    4648                }
    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, ' ');
    6249        }
    6350
Note: See TracChangeset for help on using the changeset viewer.