mirror of
https://github.com/golang/go
synced 2024-11-17 22:34:47 -07:00
cmd/gc: improve syntax error for "import testing"
for this program: package A import testing old diagnostics: pkg.go:2: syntax error: unexpected semicolon or newline, expecting string literal now: pkg.go:2: syntax error: missing import path; require quoted string Fixes #5332. R=golang-dev, r CC=golang-dev https://golang.org/cl/9393043
This commit is contained in:
parent
df29cdd33d
commit
3ac5d54cf9
@ -17,6 +17,9 @@ static struct {
|
||||
% loadsys package LIMPORT '(' LLITERAL import_package import_there ','
|
||||
"unexpected comma during import block",
|
||||
|
||||
% loadsys package LIMPORT LNAME ';'
|
||||
"missing import path; require quoted string",
|
||||
|
||||
% loadsys package imports LFUNC LNAME '(' ')' '{' LIF if_header ';'
|
||||
"unexpected semicolon or newline before {",
|
||||
|
||||
|
@ -17,6 +17,9 @@ static struct {
|
||||
221, ',',
|
||||
"unexpected comma during import block",
|
||||
|
||||
32, ';',
|
||||
"missing import path; require quoted string",
|
||||
|
||||
377, ';',
|
||||
"unexpected semicolon or newline before {",
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user