Changes in src/ResolvExpr/CurrentObject.cc [ea6332d:56e49b0]
- File:
-
- 1 edited
-
src/ResolvExpr/CurrentObject.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CurrentObject.cc
rea6332d r56e49b0 14 14 // 15 15 16 #include <stddef.h> // for size_t 17 #include <cassert> // for assertf, assert, safe_dynamic_... 18 #include <iostream> // for ostream, operator<<, basic_ost... 19 #include <stack> // for stack 20 #include <string> // for string, operator<<, allocator 21 22 #include "Common/Indenter.h" // for Indenter, operator<< 23 #include "Common/SemanticError.h" // for SemanticError 24 #include "Common/utility.h" // for toString 16 #include <stack> 17 #include <iostream> 18 25 19 #include "CurrentObject.h" 26 #include "SynTree/Constant.h" // for Constant 27 #include "SynTree/Declaration.h" // for ObjectDecl, Declaration, Struc... 28 #include "SynTree/Expression.h" // for InitAlternative, VariableExpr 29 #include "SynTree/Initializer.h" // for Designation, operator<< 30 #include "SynTree/Type.h" // for Type, StructInstType, UnionIns... 31 #include "SynTree/TypeSubstitution.h" // for TypeSubstitution 20 21 #include "SynTree/Declaration.h" 22 #include "SynTree/Initializer.h" 23 #include "SynTree/Type.h" 24 #include "SynTree/TypeSubstitution.h" 32 25 33 26 #if 0 … … 52 45 assertf( false, "unhandled type on getConstValue %s", toString( constExpr->get_result() ).c_str() ); // xxx - might be semantic error 53 46 } 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, ' '); 54 62 } 55 63
Note:
See TracChangeset
for help on using the changeset viewer.