Skip to content

Commit

Permalink
Add an ast.Walk style iterator of GoStructs. (#890)
Browse files Browse the repository at this point in the history
* Add an ast.Walk style iterator of GoStructs.

* ast.Walk: https://go.dev/src/go/ast/walk.go
* Rewrite ForEachField using the new `util.Walk` iterator, including supporting the PathQueryNodeMemo.
* Rewrite ForEachDataField and ForEachDataField2 using the new `util.Walk` iterator.

* [fix] import but not used yreflect in reflect.go

* [fix] go fmt walk.go
  • Loading branch information
shichuzhu authored Jul 12, 2023
1 parent ec273a7 commit 2302847
Show file tree
Hide file tree
Showing 3 changed files with 576 additions and 284 deletions.
Loading

0 comments on commit 2302847

Please sign in to comment.