Ignore:
Timestamp:
Aug 5, 2016, 8:27:33 AM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
9706554, dae881f
Parents:
b87e2b60
Message:

more refactoring of parser code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    rb87e2b60 r51e076e  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug  4 16:34:16 2016
    13 // Update Count     : 277
     12// Last Modified On : Fri Aug  5 07:49:32 2016
     13// Update Count     : 288
    1414//
    1515
     
    232232Expression *build_alignOf( ExpressionNode *expr_node );
    233233Expression *build_offsetOf( TypeValueNode * arg, VarRefNode *member );
     234Expression *build_and( ExpressionNode *expr_node1, ExpressionNode *expr_node2 );
     235Expression *build_and_or( ExpressionNode *expr_node1, ExpressionNode *expr_node2, bool kind );
     236Expression *build_opr1( OperatorNode::Type op, ExpressionNode *expr_node );
     237Expression *build_opr2( OperatorNode::Type op, ExpressionNode *expr_node1, ExpressionNode *expr_node2 );
     238Expression *build_cond( ExpressionNode *expr_node1, ExpressionNode *expr_node2, ExpressionNode *expr_node3 );
     239Expression *build_comma( ExpressionNode *expr_node1, ExpressionNode *expr_node2 );
     240
     241class CompositeExprNode2 : public ExpressionNode {
     242  public:
     243        CompositeExprNode2( Expression *expr );
     244        CompositeExprNode2( const CompositeExprNode2 &other );
     245        virtual ~CompositeExprNode2();
     246
     247        virtual CompositeExprNode2 *clone() const { return new CompositeExprNode2( *this ); }
     248        virtual Expression *build() const { return expr->clone(); }
     249
     250        virtual void print( std::ostream &, int indent = 0) const;
     251        virtual void printOneLine( std::ostream &, int indent = 0) const;
     252  private:
     253        Expression *expr;
     254};
    234255
    235256class CompositeExprNode : public ExpressionNode {
     
    258279        ExpressionNode *function;
    259280        ExpressionNode *arguments;
    260 };
    261 
    262 class CompositeExprNode2 : public ExpressionNode {
    263   public:
    264         CompositeExprNode2( Expression *expr );
    265         CompositeExprNode2( const CompositeExprNode2 &other );
    266         virtual ~CompositeExprNode2();
    267 
    268         virtual CompositeExprNode2 *clone() const { return new CompositeExprNode2( *this ); }
    269         virtual Expression *build() const { return expr->clone(); }
    270 
    271         virtual void print( std::ostream &, int indent = 0) const;
    272         virtual void printOneLine( std::ostream &, int indent = 0) const;
    273   private:
    274         Expression *expr;
    275281};
    276282
Note: See TracChangeset for help on using the changeset viewer.