Skip to content

Commit

Permalink
internal/core/walk: Clarify Visitor.Before documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Sackman <matthew@cue.works>
Change-Id: I8ee9f023e391308506500ce6d556c07942a58d02
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198552
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
  • Loading branch information
cuematthew committed Jul 29, 2024
1 parent 3f84ba6 commit aa8e810
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/core/walk/walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ type Visitor struct {
// Feature is invoked for all field names.
Feature func(f adt.Feature, src adt.Node)

// Before is invoked for all invoked for all nodes in pre-order traversal.
// Return false prevents the visitor from visiting the nodes descendant
// elements.
// Before is invoked for all nodes in pre-order traversal.
// Returning false prevents the visitor from visiting the node's
// children.
Before func(adt.Node) bool
}

Expand Down

0 comments on commit aa8e810

Please sign in to comment.