Fix Pattern::Accept
Reviewers: teon.banek Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1048
This commit is contained in:
parent
cf7d9070d8
commit
27370b99ff
@ -1074,9 +1074,11 @@ class Pattern : public Tree {
|
||||
DEFVISITABLE(TreeVisitor<TypedValue>);
|
||||
bool Accept(HierarchicalTreeVisitor &visitor) override {
|
||||
if (visitor.PreVisit(*this)) {
|
||||
identifier_->Accept(visitor);
|
||||
bool cont = identifier_->Accept(visitor);
|
||||
for (auto &part : atoms_) {
|
||||
if (!part->Accept(visitor)) break;
|
||||
if (cont) {
|
||||
cont = part->Accept(visitor);
|
||||
}
|
||||
}
|
||||
}
|
||||
return visitor.PostVisit(*this);
|
||||
|
Loading…
Reference in New Issue
Block a user