aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/syntax.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2020-10-12 14:07:31 -0700
committerRobert Griesemer <gri@golang.org>2020-10-13 04:38:33 +0000
commitb627988b0ca748a73867ba5fc4cfc70031c028d2 (patch)
treedf4e18f0f902b6fbc425079bfcc1397940e562dd /src/cmd/compile/internal/syntax/syntax.go
parent617b6339170a56a235625f8359730ba710d3ae96 (diff)
downloadgo-b627988b0ca748a73867ba5fc4cfc70031c028d2.tar.gz
go-b627988b0ca748a73867ba5fc4cfc70031c028d2.zip
[dev.typeparams] cmd/compile/internal/syntax: implement parsing of type parameters
Port from dev.go2go prototype branch. The compiler doesn't yet set the syntax.AllowGenerics mode, so parsing of generic code remains disabled. Known issue: The doc strings documenting the specific syntax accepted by parser methods are not all up-to-date. Change-Id: I13d134289fd9330fd0ed7f97c997cca6f23466fd Reviewed-on: https://go-review.googlesource.com/c/go/+/261658 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/syntax/syntax.go')
-rw-r--r--src/cmd/compile/internal/syntax/syntax.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/syntax/syntax.go b/src/cmd/compile/internal/syntax/syntax.go
index e51b5538b3..f3d4c09ed5 100644
--- a/src/cmd/compile/internal/syntax/syntax.go
+++ b/src/cmd/compile/internal/syntax/syntax.go
@@ -16,6 +16,7 @@ type Mode uint
// Modes supported by the parser.
const (
CheckBranches Mode = 1 << iota // check correct use of labels, break, continue, and goto statements
+ AllowGenerics
)
// Error describes a syntax error. Error implements the error interface.