Skip to content

Commit

Permalink
Move Statement::interpret into a visitor
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Feb 15, 2014
1 parent 4529423 commit 5c01a72
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 @@ -122,6 +122,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 @@ -213,7 +215,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 5c01a72

Please sign in to comment.