-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/ast: import AST changes supporting typeparams from dev.go2go
Minimal changes are made to existing types in go/ast to support type parameters. Namely: + FieldList is overloaded to hold type parameter lists. In this case, the field name becomes the type identifier, and the field type becomes the constraint. + FuncType and TypeSpec gain a TParams FieldList. + CallExpr gains a 'Brackets' flag, signaling that it uses '[]' rather than '()', representing a generic type expression with type parameters. Modifications from dev.go2go: the 'UseBrackets' field was removed from ast.File, as this support is no longer necessary. Change-Id: I21fd7390f1800dece3c14e6ec015fb2419e9fc52 Reviewed-on: https://go-review.googlesource.com/c/go/+/264181 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Trust: Robert Griesemer <gri@golang.org> Trust: Robert Findley <rfindley@google.com>
- Loading branch information
Showing
3 changed files
with
54 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters