Changeset a7d50b6
- Timestamp:
- May 27, 2019, 11:09:49 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 1259c35, 2c04369
- Parents:
- 6f4b7f2
- Location:
- src/AST
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Print.cpp
r6f4b7f2 ra7d50b6 132 132 case ast::Expr::InferUnion::Empty: return; 133 133 case ast::Expr::InferUnion::Slots: { 134 os << indent << "with " << inferred.data.resnSlots.size() 134 os << indent << "with " << inferred.data.resnSlots.size() 135 135 << " pending inference slots" << endl; 136 136 return; … … 152 152 153 153 void print( const ast::ParameterizedType::ForallList & forall ) { 154 if ( forall.empty() ) return; 154 if ( forall.empty() ) return; 155 155 os << "forall" << endl; 156 156 ++indent; … … 178 178 void print( const ast::AggregateDecl * node ) { 179 179 os << node->typeString() << " " << node->name; 180 180 181 181 if ( ! short_mode && node->linkage != Linkage::Cforall ) { 182 182 os << " " << Linkage::name( node->linkage ); 183 183 } 184 184 185 185 os << " " << (node->body ? "with" : "without") << " body"; 186 186 … … 218 218 print( node->storage ); 219 219 os << node->typeString(); 220 220 221 221 if ( node->base ) { 222 222 os << " for "; … … 623 623 virtual const ast::Stmt * visit( const ast::TryStmt * node ) { 624 624 ++indent; 625 os << "Try Statement" << endl << indent-1 625 os << "Try Statement" << endl << indent-1 626 626 << "... with block:" << endl << indent; 627 627 safe_print( node->body ); … … 663 663 safe_print( node->body ); 664 664 --indent; 665 665 666 666 return node; 667 667 } … … 684 684 os << indent-1 << "target function: "; 685 685 safe_print( clause.target.func ); 686 686 687 687 if ( ! clause.target.args.empty() ) { 688 688 os << endl << indent-1 << "... with arguments:" << endl; … … 800 800 os << "Name: " << node->name; 801 801 postprint( node ); 802 802 803 803 return node; 804 804 } … … 931 931 --indent; 932 932 postprint( node ); 933 933 934 934 return node; 935 935 } … … 1015 1015 if ( node->operand ) node->operand->accept( *this ); 1016 1016 --indent; 1017 1017 1018 1018 return node; 1019 1019 } … … 1093 1093 --indent; 1094 1094 postprint( node ); 1095 1095 1096 1096 return node; 1097 1097 } … … 1292 1292 virtual const ast::Type * visit( const ast::FunctionType * node ) { 1293 1293 preprint( node ); 1294 1294 1295 1295 os << "function" << endl; 1296 1296 if ( ! node->params.empty() ) { … … 1362 1362 virtual const ast::Type * visit( const ast::TypeInstType * node ) { 1363 1363 preprint( node ); 1364 os << "instance of type " << node->name 1364 os << "instance of type " << node->name 1365 1365 << " (" << (node->kind == ast::TypeVar::Ftype ? "" : "not ") << "function type)"; 1366 1366 print( node->params ); -
src/AST/Stmt.hpp
r6f4b7f2 ra7d50b6 278 278 ExceptionKind kind; 279 279 280 ThrowStmt( 280 ThrowStmt( 281 281 const CodeLocation & loc, ExceptionKind kind, const Expr * expr, const Expr * target, 282 282 std::vector<Label> && labels = {} ) … … 296 296 ptr<FinallyStmt> finally; 297 297 298 TryStmt( 298 TryStmt( 299 299 const CodeLocation & loc, const CompoundStmt * body, 300 300 std::vector<ptr<CatchStmt>> && handlers, const FinallyStmt * finally, … … 316 316 ExceptionKind kind; 317 317 318 CatchStmt( 318 CatchStmt( 319 319 const CodeLocation & loc, ExceptionKind kind, const Decl * decl, const Expr * cond, 320 320 const Stmt * body, std::vector<Label> && labels = {} )
Note: See TracChangeset
for help on using the changeset viewer.