mirror of
https://github.com/golang/go
synced 2024-11-18 13:54:59 -07:00
cmd/compile/internal/syntax: print position info for names in tree dump
Debugging support. Change-Id: Ia518aaed36eaba76e6233306f718ad8aff3ce744 Reviewed-on: https://go-review.googlesource.com/37875 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
1874d4a883
commit
d10b50dc34
@ -119,7 +119,7 @@ func (p *dumper) dump(x reflect.Value, n Node) {
|
|||||||
|
|
||||||
// special cases for identifiers w/o attached comments (common case)
|
// special cases for identifiers w/o attached comments (common case)
|
||||||
if x, ok := x.Interface().(*Name); ok {
|
if x, ok := x.Interface().(*Name); ok {
|
||||||
p.printf(x.Value)
|
p.printf("%s @ %v", x.Value, x.Pos())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user