source: translator/Tuples/FlattenTuple.h @ 51587aa

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 51587aa was 51587aa, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

licencing: fourth groups of files

  • Property mode set to 100644
File size: 1.7 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// FlattenTuple.h --
8//
9// Author           : Richard C. Bilson
10// Created On       : Mon May 18 07:44:20 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Mon May 18 11:28:15 2015
13// Update Count     : 3
14//
15
16#ifndef _FLATTEN_TUPLE_H_
17#define _FLATTEN_TUPLE_H_
18
19#include "SynTree/Mutator.h"
20#include "SynTree/Visitor.h"
21
22#include "SynTree/Expression.h"
23
24namespace Tuples {
25        class FlattenTuple : public Mutator {
26                typedef Mutator Parent;
27          public:
28                FlattenTuple();
29                ~FlattenTuple();
30
31                virtual Expression *mutate( TupleExpr *tupleExpr );
32          private:
33                class CollectArgs : public Visitor {
34                  public:
35                        virtual void visit( UntypedExpr * );
36                        virtual void visit( NameExpr * );
37                        virtual void visit( CastExpr *);
38                        virtual void visit( AddressExpr * );
39                        virtual void visit( UntypedMemberExpr * );
40                        virtual void visit( MemberExpr * );
41                        virtual void visit( VariableExpr * );
42                        virtual void visit( ConstantExpr * ); 
43                        virtual void visit( SizeofExpr * );
44                        virtual void visit( AttrExpr * );
45                        virtual void visit( LogicalExpr * );
46                        virtual void visit( ConditionalExpr * );
47                        virtual void visit( CommaExpr * );
48                        virtual void visit( TypeExpr * );
49                        virtual void visit( UntypedValofExpr * );
50
51                        virtual void visit( TupleExpr *tupleExpr );
52
53                        std::list< Expression *> &get_args() { return currentArgs; }
54                  private:
55                        std::list< Expression * > currentArgs;
56                };
57
58        };
59} // namespace Tuples
60
61#endif // _FLATTEN_TUPLE_H_
62
63// Local Variables: //
64// tab-width: 4 //
65// mode: c++ //
66// compile-command: "make install" //
67// End: //
Note: See TracBrowser for help on using the repository browser.