Changeset b181639
- Timestamp:
- Sep 13, 2018, 10:26:06 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 40cd873
- Parents:
- 3b3491b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeTools/ResolvProtoDump.cc
r3b3491b rb181639 37 37 class ProtoDump : public WithShortCircuiting, public WithVisitorRef<ProtoDump> { 38 38 std::set<std::string> decls; ///< Declarations in this scope 39 std:: set<std::string> exprs;///< Expressions in this scope39 std::vector<std::string> exprs; ///< Expressions in this scope 40 40 std::vector<PassVisitor<ProtoDump>> subs; ///< Sub-scopes 41 41 const ProtoDump* parent; ///< Outer lexical scope … … 63 63 /// adds a new expression to this scope 64 64 void addExpr( const std::string& s ) { 65 if ( ! s.empty() ) { exprs. insert( s ); }65 if ( ! s.empty() ) { exprs.emplace_back( s ); } 66 66 } 67 67 … … 198 198 199 199 // arrays represented as generic type 200 void previsit( ArrayType* ) { ss << "#$arr<"; ++depth; } 201 void postvisit( ArrayType* ) { --depth; ss << '>'; } 200 void previsit( ArrayType* at ) { 201 ss << "#$arr<"; 202 ++depth; 203 at->base->accept( *visitor ); 204 --depth; 205 ss << '>'; 206 visit_children = false; 207 } 202 208 203 209 // ignore top-level reference types, they're mostly transparent to resolution … … 380 386 } 381 387 382 /// Casts replaced with arguments 383 /// TODO put casts in resolv-proto 388 /// Casts replaced with result type 389 /// TODO put cast target functions in, and add second expression for target 390 void previsit( CastExpr* cast ) { 391 PassVisitor<TypePrinter> tyPrinter{ ss }; 392 cast->result->accept( tyPrinter ); 393 visit_children = false; 394 } 384 395 385 396 /// Member access handled as function from aggregate to member
Note: See TracChangeset
for help on using the changeset viewer.