Changes in / [dae881f:51e076e]


Ignore:
Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cc

    rdae881f r51e076e  
    551551//##############################################################################
    552552
     553CommaExprNode::CommaExprNode(): CompositeExprNode( new OperatorNode( OperatorNode::Comma )) {}
     554
     555CommaExprNode::CommaExprNode( ExpressionNode *exp ) : CompositeExprNode( new OperatorNode( OperatorNode::Comma ), exp ) {
     556}
     557
     558CommaExprNode::CommaExprNode( ExpressionNode *exp1, ExpressionNode *exp2) : CompositeExprNode( new OperatorNode( OperatorNode::Comma ), exp1, exp2) {
     559}
     560
     561// CommaExprNode *CommaExprNode::add_to_list( ExpressionNode *exp ) {
     562//      add_arg( exp );
     563//
     564//      return this;
     565// }
     566
     567CommaExprNode::CommaExprNode( const CommaExprNode &other ) : CompositeExprNode( other ) {
     568}
     569
     570//##############################################################################
     571
    553572ValofExprNode::ValofExprNode( StatementNode *s ): body( s ) {}
    554573
  • src/Parser/ParseNode.h

    rdae881f r51e076e  
    319319  private:
    320320        std::list< Label > labels;
     321};
     322
     323class CommaExprNode : public CompositeExprNode {
     324  public:
     325        CommaExprNode();
     326        CommaExprNode( ExpressionNode * );
     327        CommaExprNode( ExpressionNode *, ExpressionNode * );
     328        CommaExprNode( const CommaExprNode &other );
     329
     330        // virtual CommaExprNode *add_to_list( ExpressionNode * );
     331        virtual CommaExprNode *clone() const { return new CommaExprNode( *this ); }
    321332};
    322333
     
    551562};
    552563
     564class NullStmtNode : public CompoundStmtNode {
     565  public:
     566        Statement *build() const;
     567        void print( std::ostream &, int indent = 0 ) const;
     568};
     569
    553570class InitializerNode : public ParseNode {
    554571  public:
  • src/Parser/StatementNode.cc

    rdae881f r51e076e  
    417417}
    418418
     419
     420void NullStmtNode::print( ostream &os, int indent ) const {
     421        os << string( indent, ' ' ) << "Null Statement:" << endl;
     422}
     423
     424Statement *NullStmtNode::build() const {
     425        return new NullStmt;
     426}
     427
    419428// Local Variables: //
    420429// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.