mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: add Nodes.Prepend helper method
Prepared with gofmt -r. Change-Id: Ib9f224cc20353acd9c5850dead1a2d32ca5427d3 Reviewed-on: https://go-review.googlesource.com/29165 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
6f135bfd92
commit
4b8a1611b5
9 changed files with 30 additions and 16 deletions
|
|
@ -354,7 +354,7 @@ func walkrange(n *Node) {
|
|||
n.Left = typecheck(n.Left, Erv)
|
||||
n.Right = typecheck(n.Right, Etop)
|
||||
typecheckslice(body, Etop)
|
||||
n.Nbody.Set(append(body, n.Nbody.Slice()...))
|
||||
n.Nbody.Prepend(body...)
|
||||
n = walkstmt(n)
|
||||
|
||||
lineno = lno
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue