From 35a780db62b35d1b88b06bcf3b83859d8c625f00 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Sun, 10 Apr 2022 17:21:42 +0800 Subject: [PATCH] togo.ASTFile --- ast/togo/goast.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ast/togo/goast.go b/ast/togo/goast.go index fa8d85671..31ffe792a 100644 --- a/ast/togo/goast.go +++ b/ast/togo/goast.go @@ -209,7 +209,9 @@ func goDecls(decls []gopast.Decl) []ast.Decl { func ASTFile(f *gopast.File) *ast.File { return &ast.File{ - Decls: goDecls(f.Decls), + Package: f.Package, + Name: goIdent(f.Name), + Decls: goDecls(f.Decls), } }