codegen: add error printout for when codegen re-parse fails to facilitate debugging
This commit is contained in:
@@ -73,7 +73,7 @@ func FprintWithComments(w io.Writer, file *ast.File) error {
|
||||
fset = token.NewFileSet()
|
||||
parsed, err := parser.ParseFile(fset, "", buf.Bytes(), parser.ParseComments)
|
||||
if err != nil {
|
||||
return fmt.Errorf("re-parsing pretty-print: %w", err)
|
||||
return fmt.Errorf("re-parsing pretty-print: %w\n\n%s", err, buf.String())
|
||||
}
|
||||
|
||||
// Parallel walk: apply TrailingComments from the side map.
|
||||
|
||||
Reference in New Issue
Block a user