cmd/compile: add nodeSeqIterator interface
I tried to write a program to convert *NodeList to Node, but ran into too many problem cases. I'm backing off and trying a more iterative approach using interfaces. This CL adds an interface for iteration over either a *NodeList or a Nodes. I changed typechecklist to use it, to show how it works. After NodeList is eliminated, we can change the typechecklist parameter type to Nodes. Passes toolstash -cmp. Change-Id: I5c7593714b020d20868b99151b1e7cadbbdbc397 Reviewed-on: https://go-review.googlesource.com/20190 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please register or sign in to comment