Ignore:
Timestamp:
Mar 6, 2024, 6:06:43 AM (23 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
647d633
Parents:
bbf2cb1 (diff), af60383 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.h

    rbbf2cb1 rf6e8c67  
    1818#include "ParseNode.h"
    1919
    20 class InitializerNode;
     20struct InitializerNode;
    2121
    22 class ExpressionNode final : public ParseNode {
    23 public:
     22struct ExpressionNode final : public ParseList<ExpressionNode> {
    2423        ExpressionNode( ast::Expr * expr = nullptr ) : expr( expr ) {}
    2524        virtual ~ExpressionNode() {}
    2625        virtual ExpressionNode * clone() const override {
    2726                if ( nullptr == expr ) return nullptr;
    28                 return static_cast<ExpressionNode*>(
    29                         (new ExpressionNode( ast::shallowCopy( expr.get() ) ))->set_next( maybeCopy( get_next() ) ));
     27                ExpressionNode * node = new ExpressionNode( ast::shallowCopy( expr.get() ) );
     28                node->next = maybeCopy( next );
     29                return node;
    3030        }
    3131
Note: See TracChangeset for help on using the changeset viewer.