-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue/ast: add WalkVisitor to share with cue/ast/astutil
We have two copies of this walk code between the two packages. Even though we have never exposed the APIs to end users before, in practice the interface has been closely tied to their implementations for some time now, so it seems fine to settle for it for now. It's likely that once iterators in Go become widespread, we will want to revisit what better APIs we want to expose here. Adding WalkVisitor shouldn't preclude that, particularly since "Walk" is not really a verb that one would use for an iterator API anyway. That is being tracked in https://cuelang.org/issue/2953. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I5a6b7f2f12bb95a0850de86fbc2374cff480bdd6 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194006 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
- Loading branch information
Showing
4 changed files
with
32 additions
and
226 deletions.
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.