1
0
mirror of https://github.com/golang/go synced 2024-11-19 22:54:39 -07:00
go/doc
Robert Griesemer b5ddbb90bf spec: refine rules about terminating statements
Per a suggestion from mdempsky.

Both gc and gccgo consider a statement list as terminating if the
last _non_empty_ statement is terminating; i.e., trailing semis are
ok. Only gotype followed the current stricter rule in the spec.

This change adjusts the spec to match gc and gccgo behavior. In
support of this change, the spec has a matching rule for fallthrough,
which in valid positions may be followed by trailing semis as well.

For details and examples, see the issue below.

Fixes #14422.

Change-Id: Ie17c282e216fc40ecb54623445c17be111e17ade
Reviewed-on: https://go-review.googlesource.com/19981
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-04-19 17:34:12 +00:00
..
articles doc/articles/wiki: remove generated final-test.go after test 2015-06-17 03:11:01 +00:00
codewalk doc: rewrite references to plan9.bell-labs.com to 9p.io 2016-02-04 22:47:16 +00:00
devel doc: document Go 1.6.1 and Go 1.5.4 2016-04-11 05:01:44 +00:00
gopher all: link to https for golang subdomains too 2015-07-12 04:42:40 +00:00
play doc/play: update URL for concurrent pi 2016-01-06 20:23:21 +00:00
progs all: remove executable bit from several files 2015-09-04 02:59:49 +00:00
asm.html doc: fix remaining TODOs in Go 1.6 release notes 2016-02-16 16:46:17 +00:00
cmd.html all: use golang.org/x/... import paths 2014-11-10 09:15:57 +11:00
code.html doc: add Overview and other small edits to How To Write Go Code 2016-01-12 01:56:04 +00:00
conduct.html doc: Americanise spelling of wilful 2015-12-17 21:32:59 +00:00
contrib.html doc: add link to 1.6 release notes on golang.org/project page 2016-03-03 01:11:02 +00:00
contribute.html doc: fix bogus HTML in contribute.html 2016-03-09 22:16:43 +00:00
debugging_with_gdb.html doc: fix source link in gdb docs 2016-01-06 21:58:19 +00:00
docs.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
effective_go.html all: remove public named return values when useless 2016-02-29 03:31:19 +00:00
gccgo_contribute.html doc: update gccgo docs for move of gofrontend to git 2015-06-19 01:03:21 +00:00
gccgo_install.html all: link to https instead of http 2015-07-11 14:36:33 +00:00
go1.1.html all: fix misprints in comments 2015-06-11 14:18:57 +00:00
go1.2.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00
go1.3.html [release-branch.go1.4] doc: scrub references to code.google.com 2014-12-12 14:00:48 +11:00
go1.4.html doc/go1.4.html: fix typo 2015-03-24 18:17:49 +00:00
go1.5.html doc: mention that go install removes binaries built by go build 2015-09-08 18:46:07 +00:00
go1.6.html doc: GCC 6 will have the Go 1.6.1 user libraries 2016-04-14 20:00:33 +00:00
go1.7.txt doc: add httptest.ResponseRecorder note to go1.7.txt notes 2016-04-05 16:05:16 +00:00
go1.html doc: link directly to https://golang.org/dl/ 2014-09-12 09:15:58 +10:00
go1compat.html doc: add a clause about embedded methods to go1compat 2015-07-22 01:25:32 +00:00
go_faq.html doc: link to iant's generics proposal from the FAQ. 2016-04-18 01:51:26 +00:00
go_mem.html doc/go_mem.html: correct the channel example 2015-03-16 21:43:31 +00:00
go_spec.html spec: refine rules about terminating statements 2016-04-19 17:34:12 +00:00
go-logo-black.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
go-logo-blue.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
go-logo-white.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
help.html doc: revise help page with categories and more links 2016-01-14 03:15:39 +00:00
ie.css golang.org redesign 2010-09-16 14:01:02 +10:00
install-source.html doc: add classes to version tags in source install instructions 2016-04-14 23:36:29 +00:00
install.html doc: remove note about installing from source for ARM 2016-01-07 04:12:01 +00:00
root.html doc: only show Share button when enabled 2015-09-02 05:58:52 +00:00
security.html doc: security fixes are prepared for two most recent stable releases 2016-03-09 03:32:23 +00:00
share.png godoc: change link styles, add 'pop out' button 2012-03-13 11:00:11 +11:00
tos.html doc: drop scheme from links that are known to support HTTPS 2014-07-25 10:28:39 +10:00