mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: move parser.go remnants into noder.go
Change-Id: I54f8788a4703283b9aa3904e2e610097ac3e3586 Reviewed-on: https://go-review.googlesource.com/32471 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
f2d05389da
commit
2d4d22af7e
2 changed files with 15 additions and 28 deletions
|
|
@ -1150,3 +1150,18 @@ func (p *noder) pragma(pos, line int, text string) syntax.Pragma {
|
|||
|
||||
return 0
|
||||
}
|
||||
|
||||
func mkname(sym *Sym) *Node {
|
||||
n := oldname(sym)
|
||||
if n.Name != nil && n.Name.Pack != nil {
|
||||
n.Name.Pack.Used = true
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func unparen(x *Node) *Node {
|
||||
for x.Op == OPAREN {
|
||||
x = x.Left
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue