ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
ctor
deferred_resn
demangler
enum
forall-pointer-decay
gc_noraii
jacob/cs343-translation
jenkins-sandbox
memory
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
string
with_gc
Last change
on this file since 643a2e1 was 51b73452, checked in by Peter A. Buhr <pabuhr@…>, 11 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[51b73452] | 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 |
|
---|
| 10 | namespace 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.