Changes in src/SynTree/Statement.cc [6d49ea3:135b431]
- File:
-
- 1 edited
-
src/SynTree/Statement.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.cc
r6d49ea3 r135b431 419 419 } 420 420 421 WaitForStmt::WaitForStmt( std::list<Label> labels ) : Statement( labels ) { 422 timeout.time = nullptr; 423 timeout.statement = nullptr; 424 timeout.condition = nullptr; 425 orelse .statement = nullptr; 426 orelse .condition = nullptr; 427 } 428 429 WaitForStmt::WaitForStmt( const WaitForStmt & other ) : Statement( other ) { 430 clauses.reserve( other.clauses.size() ); 431 for( auto & ocl : other.clauses ) { 432 clauses.emplace_back(); 433 clauses.back().target.function = ocl.target.function->clone(); 434 cloneAll( ocl.target.arguments, clauses.back().target.arguments ); 435 clauses.back().statement = ocl.statement->clone(); 436 clauses.back().condition = ocl.condition->clone(); 437 } 438 439 timeout.time = other.timeout.time ->clone(); 440 timeout.statement = other.timeout.statement->clone(); 441 timeout.condition = other.timeout.condition->clone(); 442 orelse .statement = other.orelse .statement->clone(); 443 orelse .condition = other.orelse .condition->clone(); 444 } 445 446 WaitForStmt::~WaitForStmt() { 447 for( auto & clause : clauses ) { 448 delete clause.target.function; 449 deleteAll( clause.target.arguments ); 450 delete clause.statement; 451 delete clause.condition; 452 } 453 454 delete timeout.time; 455 delete timeout.statement; 456 delete timeout.condition; 457 458 delete orelse.statement; 459 delete orelse.condition; 460 } 461 462 void WaitForStmt::print( std::ostream &os, int indent ) const { 463 os << "Waitfor Statement" << endl; 464 os << string( indent + 2, ' ' ) << "with block:" << endl; 465 os << string( indent + 4, ' ' ); 466 // block->print( os, indent + 4 ); 467 } 468 421 469 NullStmt::NullStmt( std::list<Label> labels ) : CompoundStmt( labels ) {} 422 470 NullStmt::NullStmt() : CompoundStmt( std::list<Label>() ) {}
Note:
See TracChangeset
for help on using the changeset viewer.