source: translator/Tuples/MultRet.h @ 6c3744e

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 6c3744e was 51b7345, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1#ifndef _MULTRET_H_
2#define _MULTRET_H_
3
4#include "SynTree/Mutator.h"
5#include "SynTree/Visitor.h"
6
7#include "SynTree/Expression.h"
8#include "SynTree/Statement.h"
9
10namespace Tuples {
11  class MVRMutator : public Mutator
12  {
13    typedef Mutator Parent;
14
15  public:
16    MVRMutator();
17    ~MVRMutator();
18
19    virtual Statement  *mutate( ExprStmt        *exprStmt );
20    virtual Expression *mutate( ApplicationExpr *appExpr  );
21
22    bool hasCode() const { return ( newCode != 0 ); }
23    CompoundStmt *getCode() const { return newCode; }
24    CompoundStmt *getVars() const { return newVars; }
25
26    bool hasResults() const { return (! results.empty()); }
27    std::list<Expression *> &get_results() { return results; }
28
29  private:
30    CompoundStmt *newVars;
31    CompoundStmt *newCode;
32    std::list<Expression *> argsToAdd;
33    std::list<Expression *> results;
34
35    static int curVal;
36    DeclStmt *newVar( DeclarationWithType * );
37    void add_pending( Declaration * );
38  };
39
40} // namespace Tuples
41
42
43#endif // #ifndef _MULTRET_H_
44
45/*
46  Local Variables:
47  mode: c++
48  End:
49*/
Note: See TracBrowser for help on using the repository browser.