diff options
author | Anthony Martin <ality@pbrane.org> | 2012-02-24 14:48:36 -0500 |
---|---|---|
committer | Anthony Martin <ality@pbrane.org> | 2012-02-24 14:48:36 -0500 |
commit | dabaf74c78c5b4ec8b438d7f5cbf79441b4712fe (patch) | |
tree | f7eab82b377be19e56d11696af6d4aaf66badb68 /src/cmd/gc/yerr.h | |
parent | 1a34d5e4a9418a9e31384c40466e52bca57ee7cb (diff) | |
download | go-dabaf74c78c5b4ec8b438d7f5cbf79441b4712fe.tar.gz |
gc: reject import paths containing special characters
Also allow multiple invalid import statements in a
single file.
Fixes issue 3021. The changes to go/parser and the
language specifcation have already been committed.
R=rsc, gri
CC=golang-dev
http://codereview.appspot.com/5672084
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/gc/yerr.h')
-rw-r--r-- | src/cmd/gc/yerr.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/cmd/gc/yerr.h b/src/cmd/gc/yerr.h index 731ca7c8d..588890d0e 100644 --- a/src/cmd/gc/yerr.h +++ b/src/cmd/gc/yerr.h @@ -14,25 +14,25 @@ static struct { // is converted by bisonerrors into the yystate and yychar caused // by that token list. - 220, ',', + 221, ',', "unexpected comma during import block", - 376, ';', + 377, ';', "unexpected semicolon or newline before {", - 397, ';', + 398, ';', "unexpected semicolon or newline before {", - 236, ';', + 237, ';', "unexpected semicolon or newline before {", - 473, LBODY, + 474, LBODY, "unexpected semicolon or newline before {", 22, '{', "unexpected semicolon or newline before {", - 143, ';', + 144, ';', "unexpected semicolon or newline in type declaration", 37, '}', @@ -44,30 +44,30 @@ static struct { 37, ',', "unexpected comma in channel type", - 436, LELSE, + 437, LELSE, "unexpected semicolon or newline before else", - 256, ',', + 257, ',', "name list not allowed in interface type", - 236, LVAR, + 237, LVAR, "var declaration not allowed in for initializer", 65, '{', "unexpected { at end of statement", - 375, '{', + 376, '{', "unexpected { at end of statement", - 124, ';', + 125, ';', "argument to go/defer must be function call", - 424, ';', + 425, ';', "need trailing comma before newline in composite literal", - 111, LNAME, + 112, LNAME, "nested func not allowed", - 614, ';', + 615, ';', "else must be followed by if or statement block" }; |