1
0
mirror of https://github.com/golang/go synced 2024-10-01 05:18:33 -06:00
go/src
Robert Griesemer 546bab8c29 go/scanner: report errors for incorrect line directives
Based on decision for #24183. This makes the go/scanner behavior
match cmd/compile behavior. Adjusted a go/printer test that assumed
silent behavior for invalid line directive, and added more scanner
tests verifying the correct error position and message for invalid
line directives.

The filenames in line directives now remain untouched by the scanner;
there is no cleanup or conversion of relative into absolute paths
anymore, in sync with what the compiler's scanner/parser are doing.
Any kind of filename transformation has to be done by a client. This
makes the scanner code simpler and also more predictable.

For #24183.

Change-Id: Ia091548e1d3d89dfdf6e7d82dab50bea05742ce3
Reviewed-on: https://go-review.googlesource.com/100235
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2018-03-15 18:01:05 +00:00
..
archive archive/zip: improve Writer.Create documentation on how to add directories 2018-02-26 19:58:48 +00:00
bufio
builtin
bytes internal/bytealg: move short string Index implementations into bytealg 2018-03-04 19:49:44 +00:00
cmd runtime: identify special functions by flag instead of address 2018-03-15 17:31:57 +00:00
compress compress/gzip, compress/zlib: fix Writer documentation inconsistencies 2018-03-13 20:58:19 +00:00
container
context
crypto all: fix non-standard "DO NOT EDIT" comments for generated files 2018-03-10 17:50:11 +00:00
database/sql database/sql: fix typo in comment 2018-03-07 15:42:31 +00:00
debug debug/pe: use bytes.IndexByte instead of a loop 2018-03-07 16:12:08 +00:00
encoding all: fix non-standard "DO NOT EDIT" comments for generated files 2018-03-10 17:50:11 +00:00
errors
expvar
flag
fmt fmt: change some unexported method names to camel case 2018-02-27 20:12:04 +00:00
go go/scanner: report errors for incorrect line directives 2018-03-15 18:01:05 +00:00
hash crypto: remove hand encoded amd64 instructions 2018-03-01 19:20:53 +00:00
html all: fix misspellings 2018-02-20 21:02:58 +00:00
image all: fix non-standard "DO NOT EDIT" comments for generated files 2018-03-10 17:50:11 +00:00
index/suffixarray
internal internal/poll: if poller init fails, assume blocking mode 2018-03-06 23:21:25 +00:00
io
log
math math/big: add comment about internal assumptions on nat values 2018-03-14 18:31:05 +00:00
mime mime/multipart: test for presence of filename instead of content-type 2018-03-10 00:33:10 +00:00
net net: use golang.org/x/net/dns/dnsmessage for DNS resolution 2018-03-15 04:18:11 +00:00
os os: use WIN32_FIND_DATA.Reserved0 to identify symlinks 2018-03-07 08:51:04 +00:00
path path/filepath: use a temp dir in path_test.go 2018-03-05 23:38:39 +00:00
plugin
reflect reflect: avoid calling common if type is known to be *rtype 2018-02-22 07:18:15 +00:00
regexp regexp: Regexp shouldn't keep references to inputs 2018-02-23 16:58:48 +00:00
runtime runtime: identify special functions by flag instead of address 2018-03-15 17:31:57 +00:00
sort all: fix non-standard "DO NOT EDIT" comments for generated files 2018-03-10 17:50:11 +00:00
strconv all: fix non-standard "DO NOT EDIT" comments for generated files 2018-03-10 17:50:11 +00:00
strings internal/bytealg: move short string Index implementations into bytealg 2018-03-04 19:49:44 +00:00
sync sync: make WaitGroup more space-efficient 2018-03-15 09:56:25 +00:00
syscall syscall: use Android O friendly fstatat syscall to implement Stat on linux/amd64 2018-03-15 10:07:57 +00:00
testing testing: gracefully handle subtest failing parent’s T 2018-03-01 10:17:22 +00:00
text text/scanner: add examples 2018-03-10 02:01:58 +00:00
time time: add support for parsing timezones denoted by sign and offset 2018-03-08 17:15:35 +00:00
unicode
unsafe unsafe: fix reference to string header 2018-02-26 18:35:46 +00:00
vendor/golang_org/x net: use golang.org/x/net/dns/dnsmessage for DNS resolution 2018-03-15 04:18:11 +00:00
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: don't require GOARCH set 2018-03-07 14:01:43 +00:00
bootstrap.bash bootstrap.bash: only fetch git revision if we need it 2018-01-30 15:11:56 +00:00
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash iostest.bash: don't build std library twice 2018-03-06 16:08:20 +00:00
make.bash
make.bat build: small cleanup in error message in make.bat 2018-02-26 10:27:14 +00:00
Make.dist
make.rc
naclmake.bash nacl*.bash: pass flags to make.bash 2018-02-14 17:09:31 +00:00
nacltest.bash nacl*.bash: pass flags to make.bash 2018-02-14 17:09:31 +00:00
race.bash
race.bat
run.bash
run.bat
run.rc