source: translator/Tuples/FlattenTuple.h @ ad17ba6a

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since ad17ba6a was 51b7345, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

initial commit

  • Property mode set to 100644
File size: 1.3 KB
Line 
1#ifndef _FLATTEN_TUPLE_H_
2#define _FLATTEN_TUPLE_H_
3
4#include "SynTree/Mutator.h"
5#include "SynTree/Visitor.h"
6
7#include "SynTree/Expression.h"
8
9namespace Tuples {
10  class FlattenTuple : public Mutator
11  {
12    typedef Mutator Parent;
13
14  public:
15    FlattenTuple();
16    ~FlattenTuple();
17
18    virtual Expression *mutate( TupleExpr *tupleExpr );
19
20  private:
21    class CollectArgs : public Visitor
22    {
23    public:
24      virtual void visit( UntypedExpr * );
25      virtual void visit( NameExpr * );
26      virtual void visit( CastExpr *);
27      virtual void visit( AddressExpr * );
28      virtual void visit( UntypedMemberExpr * );
29      virtual void visit( MemberExpr * );
30      virtual void visit( VariableExpr * );
31      virtual void visit( ConstantExpr * ); 
32      virtual void visit( SizeofExpr * );
33      virtual void visit( AttrExpr * );
34      virtual void visit( LogicalExpr * );
35      virtual void visit( ConditionalExpr * );
36      virtual void visit( CommaExpr * );
37      virtual void visit( TypeExpr * );
38      virtual void visit( UntypedValofExpr * );
39
40      virtual void visit( TupleExpr *tupleExpr );
41
42      std::list< Expression *> &get_args() { return currentArgs; }
43    private:
44      std::list< Expression * > currentArgs;
45    };
46
47  };
48
49} // namespace Tuples
50
51
52#endif // #ifndef _FLATTEN_TUPLE_H_
53
54/*
55  Local Variables:
56  mode: c++
57  End:
58*/
Note: See TracBrowser for help on using the repository browser.