Skip to content

Commit

Permalink
Merge pull request #3267 from yebblies/statementinterpret
Browse files Browse the repository at this point in the history
[DDMD] [refactor] Move Statement::interpret into a visitor
  • Loading branch information
AndrejMitrovic committed Feb 15, 2014
2 parents 50106cc + 5c01a72 commit 92660f1
Show file tree
Hide file tree
Showing 3 changed files with 958 additions and 895 deletions.
7 changes: 6 additions & 1 deletion src/expression.h
Expand Up @@ -121,6 +121,8 @@ enum CtfeGoal
ctfeNeedNothing // The return value is not required
};

Expression *interpret(Expression *e, InterState *istate, CtfeGoal goal);

#define WANTflags 1
#define WANTvalue 2
// Same as WANTvalue, but also expand variables as far as possible
Expand Down Expand Up @@ -212,7 +214,10 @@ class Expression : public RootObject
{
return ::ctfeInterpret(this);
}
Expression *interpret(InterState *istate, CtfeGoal goal = ctfeNeedRvalue);
Expression *interpret(InterState *istate, CtfeGoal goal = ctfeNeedRvalue)
{
return ::interpret(this, istate, goal);
}

int isConst() { return ::isConst(this); }
virtual int isBool(int result);
Expand Down

0 comments on commit 92660f1

Please sign in to comment.