-
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.
[dev.typeparams] cmd/compile/internal/syntax: always use IndexExpr no…
…de for type instantiation Per @mdempsky's suggestion: Instead of representing a type instantiation T[P] by an IndexExpr node, and a type instantiation with multiple type arguments T[P1, P2] by a CallExpr node with special Brackets flag, always use an IndexExpr. Use a ListExpr as index in the (less common) case of multiple type arguments. This removes the need for the CallExpr.Brackets field and cleans up the parser code around type instantiations. Backport of syntax package changes from https://golang.org/cl/262020. Change-Id: I32e8bc4eafac5b3ef2e7eb40fa8c790a5a905b69 Reviewed-on: https://go-review.googlesource.com/c/go/+/262137 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
- Loading branch information
Showing
3 changed files
with
138 additions
and
88 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