Skip to content

Commit

Permalink
fix evaluableExprVisitor (#3389)
Browse files Browse the repository at this point in the history
  • Loading branch information
czpmango committed Dec 3, 2021
1 parent 7d0bfed commit 69bd48f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/graph/visitor/EvaluableExprVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ class EvaluableExprVisitor : public ExprVisitorImpl {

void visit(SubscriptRangeExpression *) override { isEvaluable_ = false; }

void visitBinaryExpr(BinaryExpression *expr) override {
expr->left()->accept(this);
// Evaluable sub-expression should be obscured by the non-evaluable sub-expression.
if (isEvaluable_) {
expr->right()->accept(this);
}
}

bool isEvaluable_{true};
};

Expand Down

0 comments on commit 69bd48f

Please sign in to comment.