You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go tool compile b6589fc6ab0dc82cf12099d1c2d40ab994e8410c
b6589fc6ab0dc82cf12099d1c2d40ab994e8410c:2: syntax error: package statement must be first
$ go tool compile -oldparser b6589fc6ab0dc82cf12099d1c2d40ab994e8410c
b6589fc6ab0dc82cf12099d1c2d40ab994e8410c:1: package statement must be first
go version devel +25a28da Sun Nov 15 23:41:28 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered:
After golang.org/cl/19652 removed the bizarre lexlineno{++,--}
statements for parsing canned imports, this hack for #13267 is no
longer necessary:
$ echo -n 0 > /tmp/0.go
$ go tool compile /tmp/0.go
/tmp/0.go:1: syntax error: package statement must be first
Apparently setting lexlineno to 2 while parsing the canned imports
caused prevlineno and lineno to also be set to 2. After we finished
parsing imports and restored lexlineno to 1, since "package" is the
first token in a source file, we'll have fixed lineno = 1, but
prevlineno was still set to 2.
Change-Id: Ibcc49fe3402264819b9abb53505631f7a0ad4a36
Reviewed-on: https://go-review.googlesource.com/19859
Reviewed-by: Robert Griesemer <[email protected]>
newparser/oldparser disagree:
0
$ go tool compile b6589fc6ab0dc82cf12099d1c2d40ab994e8410c
b6589fc6ab0dc82cf12099d1c2d40ab994e8410c:2: syntax error: package statement must be first
$ go tool compile -oldparser b6589fc6ab0dc82cf12099d1c2d40ab994e8410c
b6589fc6ab0dc82cf12099d1c2d40ab994e8410c:1: package statement must be first
go version devel +25a28da Sun Nov 15 23:41:28 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: