go/src
Matthew Dempsky 7d3a40978a cmd/compile: refactor export data parsing
Merge push_parser and pop_parser into a single parse_import function
and inline unimportfile. Shake out function boundaries a little bit so
that the symmetry is readily visible.

Move the import_package call into parse_import (and inline
import_there into import_package).  This means importfile no longer
needs to provide fake import data to be needlessly lexed/parsed every
time it's called.

Also, instead of indicating import success/failure by whether the next
token is "package", import_spec can just check whether importpkg is
non-nil.

Tangentially, this somehow alters the diagnostics produced for
test/fixedbugs/issue11610.go.  However, the new diagnostics are more
consistent with those produced when the empty import statement is
absent, which seems more desirable than maintaining the previous
errors.

Change-Id: I5cd1c22aa14da8a743ef569ff084711d137279d5
Reviewed-on: https://go-review.googlesource.com/19650
Reviewed-by: Robert Griesemer <gri@golang.org>
2016-02-20 04:31:42 +00:00
..
archive archive/zip: handle pre-zip64 zip files containing 2³²-1-byte content 2016-02-02 16:36:59 +00:00
bufio bufio: clarify Read docs 2015-12-01 20:05:25 +00:00
builtin
bytes bytes: document that buffer is reused in Truncate and Reset 2015-12-18 19:40:58 +00:00
cmd cmd/compile: refactor export data parsing 2016-02-20 04:31:42 +00:00
compress build: shorten a few packages with long tests 2015-12-29 15:46:44 +00:00
container
crypto crypto/rsa: expand on documentation and add some examples. 2016-01-27 00:11:22 +00:00
database/sql database/sql: implement Scan of time.Time, document, clarify Scan error text 2016-01-27 07:37:17 +00:00
debug debug/dwarf: fix nil pointer dereference in cyclic type structures 2016-01-14 02:05:31 +00:00
encoding all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
errors
expvar
flag
fmt fmt: remove math package dependency and avoid float operations 2016-02-19 22:55:30 +00:00
go cmd/compile: make -A and -newexport compatible 2016-02-19 21:42:04 +00:00
hash cmd/internal/obj/x86: add new instructions, cleanup. 2016-01-13 14:04:44 +00:00
html text/template,html/template: correct comment in DefinedTemplates 2015-11-24 21:52:36 +00:00
image image/color: have NYCbCrA.RGBA work in 16-bit color. 2015-12-24 06:55:33 +00:00
index/suffixarray
internal net/http: update http2 to check header values, move from vendor to internal 2016-01-21 00:19:02 +00:00
io io/ioutil: add examples to functions 2015-11-30 19:47:18 +00:00
log log/syslog: document that syslog is frozen 2016-01-05 22:56:07 +00:00
math all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
mime all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
net all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
os all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
path all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
reflect reflect: document DeepEqual, fix case of maps with NaN keys 2015-12-11 05:50:05 +00:00
regexp all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
runtime runtime: skip cgo check for non-pointer slice elements 2016-02-19 16:07:27 +00:00
sort sort: Fix typo in stable sort comment 2016-02-18 19:20:41 +00:00
strconv
strings
sync sync: deflake TestWaitGroupMisuse3 2016-02-03 20:03:32 +00:00
syscall cmd/compile: recognize Syscall-like functions for liveness analysis 2016-01-14 01:16:45 +00:00
testing testing: move comment inside T.Parallel 2016-01-06 17:59:55 +00:00
text all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
time all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
unicode unicode/utf8: add test for FullRune 2015-12-01 10:39:06 +00:00
unsafe unsafe: fix typo in documentation of valid Pointer->uintptr->Pointer conversions 2016-01-29 00:41:27 +00:00
vendor net/http: update http2 to check header values, move from vendor to internal 2016-01-21 00:19:02 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash build: use consistent shebang line 2016-01-14 03:16:20 +00:00
buildall.bash build: test linux/mips64 and linux/mips64le with buildall.bash 2016-01-19 04:43:44 +00:00
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash src: remove reference to since-deleted dist -s flag 2015-12-17 22:03:56 +00:00
make.bat
make.rc
nacltest.bash
race.bash cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
race.bat cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.bash cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.bat cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.rc cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00