mirror of
https://github.com/golang/go
synced 2024-11-21 22:54:40 -07:00
go spec: newlines cannot be used inside a char or "" string literal
R=r CC=golang-dev https://golang.org/cl/4462043
This commit is contained in:
parent
d97b8a817b
commit
0e8032ca49
@ -1,5 +1,5 @@
|
|||||||
<!-- title The Go Programming Language Specification -->
|
<!-- title The Go Programming Language Specification -->
|
||||||
<!-- subtitle Version of May 2, 2011 -->
|
<!-- subtitle Version of May 4, 2011 -->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
TODO
|
TODO
|
||||||
@ -102,7 +102,8 @@ compiler may disallow the NUL character (U+0000) in the source text.
|
|||||||
The following terms are used to denote specific Unicode character classes:
|
The following terms are used to denote specific Unicode character classes:
|
||||||
</p>
|
</p>
|
||||||
<pre class="ebnf">
|
<pre class="ebnf">
|
||||||
unicode_char = /* an arbitrary Unicode code point */ .
|
newline = /* the Unicode code point U+000A */ .
|
||||||
|
unicode_char = /* an arbitrary Unicode code point except newline */ .
|
||||||
unicode_letter = /* a Unicode code point classified as "Letter" */ .
|
unicode_letter = /* a Unicode code point classified as "Letter" */ .
|
||||||
unicode_digit = /* a Unicode code point classified as "Decimal Digit" */ .
|
unicode_digit = /* a Unicode code point classified as "Decimal Digit" */ .
|
||||||
</pre>
|
</pre>
|
||||||
@ -471,7 +472,7 @@ U+00FF.
|
|||||||
|
|
||||||
<pre class="ebnf">
|
<pre class="ebnf">
|
||||||
string_lit = raw_string_lit | interpreted_string_lit .
|
string_lit = raw_string_lit | interpreted_string_lit .
|
||||||
raw_string_lit = "`" { unicode_char } "`" .
|
raw_string_lit = "`" { unicode_char | newline } "`" .
|
||||||
interpreted_string_lit = `"` { unicode_value | byte_value } `"` .
|
interpreted_string_lit = `"` { unicode_value | byte_value } `"` .
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user