authorgravatar for codroid@gmail.comhryx <codroid@gmail.com> 2019-07-04 22:52:17-07:00
committergravatar for codroid@gmail.comhryx <codroid@gmail.com> 2019-07-04 22:52:17-07:00
loge35d49c4d03ea7a84a2d588be8f97108ea616dd7
treeeb47d816152361a700e7c5a713a2db4085ecf2a2
parent6bfa8546bbdf6dd644a65876135893339b767bba
signaturelock-open Commit is signed but in an unrecognized format.

Unicode escapes: documentation and grammar


1 files changed, 4 insertions(+), 9 deletions(-)

doc/langref.html.in+4-9
...@@ -566,7 +566,7 @@ test "string literals" {...@@ -566,7 +566,7 @@ test "string literals" {
566 assert(normal_bytes.len == 5);566 assert(normal_bytes.len == 5);
567 assert(normal_bytes[1] == 'e');567 assert(normal_bytes[1] == 'e');
568 assert('e' == '\x65');568 assert('e' == '\x65');
569 assert('\U01f4a9' == 128169);569 assert('\u{1f4a9}' == 128169);
570 assert(mem.eql(u8, "hello", "h\x65llo"));570 assert(mem.eql(u8, "hello", "h\x65llo"));
571571
572 // A C string literal is a null terminated pointer.572 // A C string literal is a null terminated pointer.
...@@ -616,12 +616,8 @@ test "string literals" {...@@ -616,12 +616,8 @@ test "string literals" {
616 <td>hexadecimal 8-bit character code (2 digits)</td>616 <td>hexadecimal 8-bit character code (2 digits)</td>
617 </tr>617 </tr>
618 <tr>618 <tr>
619 <td><code>\uNNNN</code></td>619 <td><code>\u{NNNNNN}</code></td>
620 <td>hexadecimal 16-bit Unicode character code UTF-8 encoded (4 digits)</td>620 <td>hexadecimal Unicode character code UTF-8 encoded (1 or more digits)</td>
621 </tr>
622 <tr>
623 <td><code>\UNNNNNN</code></td>
624 <td>hexadecimal 24-bit Unicode character code UTF-8 encoded (6 digits)</td>
625 </tr>621 </tr>
626 </table>622 </table>
627 </div>623 </div>
...@@ -10008,8 +10004,7 @@ eof &lt;- !....@@ -10008,8 +10004,7 @@ eof &lt;- !.
10008hex &lt;- [0-9a-fA-F]10004hex &lt;- [0-9a-fA-F]
10009char_escape10005char_escape
10010 &lt;- "\\x" hex hex10006 &lt;- "\\x" hex hex
10011 / "\\u" hex hex hex hex10007 / "\\u{" hex+ "}"
10012 / "\\U" hex hex hex hex hex hex
10013 / "\\" [nr\\t'"]10008 / "\\" [nr\\t'"]
10014char_char10009char_char
10015 &lt;- char_escape10010 &lt;- char_escape