Commit a10fe9f6 authored by Rob Findley's avatar Rob Findley Committed by Robert Findley
Browse files

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: default avatarRobert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Robert Findley <rfindley@google.com>
parent 7a8a720c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment