Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r033ff37 r5d00425  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 25 22:21:48 2019
    13 // Update Count     : 61
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr Aug 15 13:43:00 2019
     13// Update Count     : 64
    1414//
    1515
     
    6363}
    6464
     65bool Expression::get_lvalue() const {
     66        assert( !result->get_lvalue() );
     67        return false;
     68}
     69
    6570void Expression::print( std::ostream & os, Indenter indent ) const {
    6671        printInferParams( inferParams, os, indent+1, 0 );
     
    134139}
    135140
     141bool VariableExpr::get_lvalue() const {
     142        return result->get_lvalue();
     143}
     144
    136145VariableExpr * VariableExpr::functionPointer( FunctionDecl * func ) {
    137146        VariableExpr * funcExpr = new VariableExpr( func );
     
    265274CastExpr::~CastExpr() {
    266275        delete arg;
     276}
     277
     278bool CastExpr::get_lvalue() const {
     279        return result->get_lvalue();
    267280}
    268281
     
    376389        // don't delete the member declaration, since it points somewhere else in the tree
    377390        delete aggregate;
     391}
     392
     393bool MemberExpr::get_lvalue() const {
     394        assert( result->get_lvalue() );
     395        return true;
    378396}
    379397
     
    428446}
    429447
     448bool UntypedExpr::get_lvalue() const {
     449        return result->get_lvalue();
     450}
    430451
    431452void UntypedExpr::print( std::ostream & os, Indenter indent ) const {
     
    486507        delete arg2;
    487508        delete arg3;
     509}
     510
     511bool ConditionalExpr::get_lvalue() const {
     512        return result->get_lvalue();
    488513}
    489514
     
    544569}
    545570
     571bool ConstructorExpr::get_lvalue() const {
     572        return result->get_lvalue();
     573}
     574
    546575void ConstructorExpr::print( std::ostream & os, Indenter indent ) const {
    547576        os <<  "Constructor Expression: " << std::endl << indent+1;
     
    561590CompoundLiteralExpr::~CompoundLiteralExpr() {
    562591        delete initializer;
     592}
     593
     594bool CompoundLiteralExpr::get_lvalue() const {
     595        assert( result->get_lvalue() );
     596        return true;
    563597}
    564598
     
    612646                result = new VoidType( Type::Qualifiers() );
    613647        }
     648}
     649bool StmtExpr::get_lvalue() const {
     650        return result->get_lvalue();
    614651}
    615652void StmtExpr::print( std::ostream & os, Indenter indent ) const {
Note: See TracChangeset for help on using the changeset viewer.