Alan Donovan submitted this change.
go/types/internal/play: show AST debug representation too
Change-Id: Id3109a9dd058c08156b120471f59df34703aeecb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/479975
Run-TryBot: Robert Findley <rfin...@google.com>
gopls-CI: kokoro <noreply...@google.com>
Reviewed-by: Robert Findley <rfin...@google.com>
TryBot-Result: Gopher Robot <go...@golang.org>
---
M go/types/internal/play/play.go
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/go/types/internal/play/play.go b/go/types/internal/play/play.go
index 8be804b4..e53d988 100644
--- a/go/types/internal/play/play.go
+++ b/go/types/internal/play/play.go
@@ -165,6 +165,9 @@
}
fmt.Fprintf(out, "\n")
+ // Syntax debug output.
+ ast.Fprint(out, fset, path[0], nil) // ignore errors
+
// Clean up the messy temp file name.
outStr := strings.ReplaceAll(out.String(), f.Name(), "play.go")
To view, visit change 479975. To unsubscribe, or for help writing mail filters, visit settings.