-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SimpleTraitMatcher uses preVisit rather than visit
- Loading branch information
1 parent
c489aa3
commit 1c11e1f
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,7 @@ public Stream<U> lower(Cursor cursor) { | |
public <P> TreeVisitor<? extends Tree, P> asVisitor(VisitFunction2<U, P> visitor) { | ||
return new TreeVisitor<Tree, P>() { | ||
@Override | ||
public @Nullable Tree visit(@Nullable Tree tree, P p) { | ||
public @Nullable Tree preVisit(Tree tree, P p) { | ||
U u = test(getCursor()); | ||
return u != null ? | ||
visitor.visit(u, p) : | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
knutwannheden
Contributor
|
||
|
@jkschneider Wouldn't it make sense for the else branch to call
preVisit()
instead ofvisit()
? I.e.super.preVisit(tree, P)
.