Changes in src/SynTree/Expression.cc [033ff37:5d00425]
- File:
-
- 1 edited
-
src/SynTree/Expression.cc (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
r033ff37 r5d00425 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Th u Jul 25 22:21:48201913 // Update Count : 6 111 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr Aug 15 13:43:00 2019 13 // Update Count : 64 14 14 // 15 15 … … 63 63 } 64 64 65 bool Expression::get_lvalue() const { 66 assert( !result->get_lvalue() ); 67 return false; 68 } 69 65 70 void Expression::print( std::ostream & os, Indenter indent ) const { 66 71 printInferParams( inferParams, os, indent+1, 0 ); … … 134 139 } 135 140 141 bool VariableExpr::get_lvalue() const { 142 return result->get_lvalue(); 143 } 144 136 145 VariableExpr * VariableExpr::functionPointer( FunctionDecl * func ) { 137 146 VariableExpr * funcExpr = new VariableExpr( func ); … … 265 274 CastExpr::~CastExpr() { 266 275 delete arg; 276 } 277 278 bool CastExpr::get_lvalue() const { 279 return result->get_lvalue(); 267 280 } 268 281 … … 376 389 // don't delete the member declaration, since it points somewhere else in the tree 377 390 delete aggregate; 391 } 392 393 bool MemberExpr::get_lvalue() const { 394 assert( result->get_lvalue() ); 395 return true; 378 396 } 379 397 … … 428 446 } 429 447 448 bool UntypedExpr::get_lvalue() const { 449 return result->get_lvalue(); 450 } 430 451 431 452 void UntypedExpr::print( std::ostream & os, Indenter indent ) const { … … 486 507 delete arg2; 487 508 delete arg3; 509 } 510 511 bool ConditionalExpr::get_lvalue() const { 512 return result->get_lvalue(); 488 513 } 489 514 … … 544 569 } 545 570 571 bool ConstructorExpr::get_lvalue() const { 572 return result->get_lvalue(); 573 } 574 546 575 void ConstructorExpr::print( std::ostream & os, Indenter indent ) const { 547 576 os << "Constructor Expression: " << std::endl << indent+1; … … 561 590 CompoundLiteralExpr::~CompoundLiteralExpr() { 562 591 delete initializer; 592 } 593 594 bool CompoundLiteralExpr::get_lvalue() const { 595 assert( result->get_lvalue() ); 596 return true; 563 597 } 564 598 … … 612 646 result = new VoidType( Type::Qualifiers() ); 613 647 } 648 } 649 bool StmtExpr::get_lvalue() const { 650 return result->get_lvalue(); 614 651 } 615 652 void StmtExpr::print( std::ostream & os, Indenter indent ) const {
Note:
See TracChangeset
for help on using the changeset viewer.