• Ian Lance Taylor's avatar
    cmd/compile: add nodeSeqIterator interface · 466c948b
    Ian Lance Taylor authored
    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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
    466c948b
lex.go 48.5 KB