Skip to content

Commit

Permalink
go/types: generate literals.go from corresponding types2 source
Browse files Browse the repository at this point in the history
Change-Id: I0635101b984725ee24c2207ebfdb413d29212b67
Reviewed-on: https://go-review.googlesource.com/c/go/+/610558
Reviewed-by: Tim King <taking@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
griesemer authored and gopherbot committed Sep 5, 2024
1 parent aca0e2b commit e3f3083
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 9 additions & 3 deletions src/go/types/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,15 @@ var filemap = map[string]action{
// "initorder.go": fixErrErrorfCall, // disabled for now due to unresolved error_ use implications for gopls
"instantiate.go": func(f *ast.File) { fixTokenPos(f); fixCheckErrorfCall(f) },
"instantiate_test.go": func(f *ast.File) { renameImportPath(f, `"cmd/compile/internal/types2"->"go/types"`) },
"lookup.go": func(f *ast.File) { fixTokenPos(f) },
"main_test.go": nil,
"map.go": nil,
"literals.go": func(f *ast.File) {
renameImportPath(f, `"cmd/compile/internal/syntax"->"go/ast"`)
renameSelectorExprs(f, "syntax.Name->ast.Ident", "key.Value->key.Name", "atyp.Elem->atyp.Elt") // must happen before renaming identifiers
renameIdents(f, "syntax->ast")
renameSelectors(f, "ElemList->Elts")
},
"lookup.go": func(f *ast.File) { fixTokenPos(f) },
"main_test.go": nil,
"map.go": nil,
"mono.go": func(f *ast.File) {
fixTokenPos(f)
insertImportPath(f, `"go/ast"`)
Expand Down
9 changes: 5 additions & 4 deletions src/go/types/literals.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e3f3083

Please sign in to comment.