Changes in src/AST/Print.cpp [3b0bc16:0351e9f]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Print.cpp
r3b0bc16 r0351e9f 333 333 print( node->funcSpec ); 334 334 335 336 337 if ( node->type && node->isTypeFixed ) { 335 if ( node->type ) { 338 336 node->type->accept( *this ); 339 337 } else { 340 if (!node->type_params.empty()) { 341 os << "forall" << endl; 342 ++indent; 343 printAll(node->type_params); 344 os << indent; 345 --indent; 346 347 if (!node->assertions.empty()) { 348 os << "with assertions" << endl; 349 ++indent; 350 printAll(node->assertions); 351 os << indent; 352 --indent; 353 } 354 } 355 356 os << "function" << endl; 357 if ( ! node->params.empty() ) { 358 os << indent << "... with parameters" << endl; 359 ++indent; 360 printAll( node->params ); 361 if ( node->type->isVarArgs ) { 362 os << indent << "and a variable number of other arguments" << endl; 363 } 364 --indent; 365 } else if ( node->type->isVarArgs ) { 366 os << indent+1 << "accepting unspecified arguments" << endl; 367 } 368 369 os << indent << "... returning"; 370 if ( node->returns.empty() ) { 371 os << " nothing" << endl; 372 } else { 373 os << endl; 374 ++indent; 375 printAll( node->returns ); 376 --indent; 377 } 338 os << "untyped entity"; 378 339 } 379 340 … … 511 472 ++indent; 512 473 os << indent; 513 safe_print( node->then );514 --indent; 515 516 if ( node->else _!= 0 ) {474 safe_print( node->thenPart ); 475 --indent; 476 477 if ( node->elsePart != 0 ) { 517 478 os << indent << "... else:" << endl; 518 479 ++indent; 519 480 os << indent; 520 node->else _->accept( *this );481 node->elsePart->accept( *this ); 521 482 --indent; 522 483 } // if … … 524 485 } 525 486 526 virtual const ast::Stmt * visit( const ast::While DoStmt * node ) override final {487 virtual const ast::Stmt * visit( const ast::WhileStmt * node ) override final { 527 488 if ( node->isDoWhile ) { os << "Do-"; } 528 489 os << "While on condition:" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.