Commit d10b50dc authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile/internal/syntax: print position info for names in tree dump

Debugging support.

Change-Id: Ia518aaed36eaba76e6233306f718ad8aff3ce744
Reviewed-on: https://go-review.googlesource.com/37875Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
parent 1874d4a8
......@@ -119,7 +119,7 @@ func (p *dumper) dump(x reflect.Value, n Node) {
// special cases for identifiers w/o attached comments (common case)
if x, ok := x.Interface().(*Name); ok {
p.printf(x.Value)
p.printf("%s @ %v", x.Value, x.Pos())
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment