Changeset e67991f for src/SynTree
- Timestamp:
- Jul 16, 2019, 10:38:32 AM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 6f15121
- Parents:
- 7dc2e57b
- Location:
- src/SynTree
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r7dc2e57b re67991f 360 360 }; 361 361 362 class WithStmt : public Declaration { 363 public: 364 std::list< Expression * > exprs; 365 Statement * stmt; 366 367 WithStmt( const std::list< Expression * > & exprs, Statement * stmt ); 368 WithStmt( const WithStmt & other ); 369 virtual ~WithStmt(); 370 371 virtual WithStmt * clone() const override { return new WithStmt( *this ); } 372 virtual void accept( Visitor & v ) override { v.visit( this ); } 373 virtual void accept( Visitor & v ) const override { v.visit( this ); } 374 virtual Declaration * acceptMutator( Mutator & m ) override { return m.mutate( this ); } 375 virtual void print( std::ostream & os, Indenter indent = {} ) const override; 376 virtual void printShort( std::ostream & os, Indenter indent = {} ) const override { print(os, indent); } 377 }; 378 362 379 class AsmDecl : public Declaration { 363 380 public: -
src/SynTree/Expression.cc
r7dc2e57b re67991f 724 724 } 725 725 726 DeletedExpr::DeletedExpr( Expression * expr, BaseSyntaxNode* deleteStmt ) : expr( expr ), deleteStmt( deleteStmt ) {726 DeletedExpr::DeletedExpr( Expression * expr, Declaration * deleteStmt ) : expr( expr ), deleteStmt( deleteStmt ) { 727 727 assert( expr->result ); 728 728 result = expr->result->clone(); -
src/SynTree/Expression.h
r7dc2e57b re67991f 888 888 public: 889 889 Expression * expr; 890 BaseSyntaxNode* deleteStmt;891 892 DeletedExpr( Expression * expr, BaseSyntaxNode* deleteStmt );890 Declaration * deleteStmt; 891 892 DeletedExpr( Expression * expr, Declaration * deleteStmt ); 893 893 DeletedExpr( const DeletedExpr & other ); 894 894 ~DeletedExpr(); -
src/SynTree/Mutator.h
r7dc2e57b re67991f 52 52 virtual Statement * mutate( FinallyStmt * catchStmt ) = 0; 53 53 virtual Statement * mutate( WaitForStmt * waitforStmt ) = 0; 54 virtual Statement* mutate( WithStmt * withStmt ) = 0;54 virtual Declaration * mutate( WithStmt * withStmt ) = 0; 55 55 virtual NullStmt * mutate( NullStmt * nullStmt ) = 0; 56 56 virtual Statement * mutate( DeclStmt * declStmt ) = 0; -
src/SynTree/Statement.cc
r7dc2e57b re67991f 493 493 494 494 495 WithStmt::WithStmt( const std::list< Expression * > & exprs, Statement * stmt ) : Statement(), exprs( exprs ), stmt( stmt ) {}496 WithStmt::WithStmt( const WithStmt & other ) : Statement( other ), stmt( maybeClone( other.stmt ) ) {495 WithStmt::WithStmt( const std::list< Expression * > & exprs, Statement * stmt ) : Declaration("", noStorageClasses, LinkageSpec::Cforall), exprs( exprs ), stmt( stmt ) {} 496 WithStmt::WithStmt( const WithStmt & other ) : Declaration( other ), stmt( maybeClone( other.stmt ) ) { 497 497 cloneAll( other.exprs, exprs ); 498 498 } -
src/SynTree/Statement.h
r7dc2e57b re67991f 461 461 }; 462 462 463 class WithStmt : public Statement {464 public:465 std::list< Expression * > exprs;466 Statement * stmt;467 468 WithStmt( const std::list< Expression * > & exprs, Statement * stmt );469 WithStmt( const WithStmt & other );470 virtual ~WithStmt();471 472 virtual WithStmt * clone() const override { return new WithStmt( *this ); }473 virtual void accept( Visitor & v ) override { v.visit( this ); }474 virtual void accept( Visitor & v ) const override { v.visit( this ); }475 virtual Statement * acceptMutator( Mutator & m ) override { return m.mutate( this ); }476 virtual void print( std::ostream & os, Indenter indent = {} ) const override;477 };463 // class WithStmt : public Statement { 464 // public: 465 // std::list< Expression * > exprs; 466 // Statement * stmt; 467 468 // WithStmt( const std::list< Expression * > & exprs, Statement * stmt ); 469 // WithStmt( const WithStmt & other ); 470 // virtual ~WithStmt(); 471 472 // virtual WithStmt * clone() const override { return new WithStmt( *this ); } 473 // virtual void accept( Visitor & v ) override { v.visit( this ); } 474 // virtual void accept( Visitor & v ) const override { v.visit( this ); } 475 // virtual Statement * acceptMutator( Mutator & m ) override { return m.mutate( this ); } 476 // virtual void print( std::ostream & os, Indenter indent = {} ) const override; 477 // }; 478 478 479 479
Note:
See TracChangeset
for help on using the changeset viewer.