1
0
mirror of https://github.com/golang/go synced 2024-11-25 02:47:58 -07:00

go spec: line comments may end in EOF

Consistency argument: A valid Go program should
remain valid after stripping leading and trailing
whitespace. This was not true so far if the last
text in the source was a line comment.

R=iant, ken2, r, rsc, r2
CC=golang-dev
https://golang.org/cl/2906041
This commit is contained in:
Robert Griesemer 2010-11-04 13:48:32 -07:00
parent 23c41a1ef2
commit d73d1c5f32

View File

@ -1,5 +1,5 @@
<!-- title The Go Programming Language Specification --> <!-- title The Go Programming Language Specification -->
<!-- subtitle Version of Oct 29, 2010 --> <!-- subtitle Version of Nov 4, 2010 -->
<!-- <!--
TODO TODO
@ -138,7 +138,7 @@ There are two forms of comments:
<ol> <ol>
<li> <li>
<i>Line comments</i> start with the character sequence <code>//</code> <i>Line comments</i> start with the character sequence <code>//</code>
and continue through the next newline. A line comment acts like a newline. and stop at the end of the line. A line comment acts like a newline.
</li> </li>
<li> <li>
<i>General comments</i> start with the character sequence <code>/*</code> <i>General comments</i> start with the character sequence <code>/*</code>