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
Please sign in to comment