aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorhryx <codroid@gmail.com>2019-07-04 22:52:17 -0700
committerhryx <codroid@gmail.com>2019-07-04 22:52:17 -0700
commite35d49c4d03ea7a84a2d588be8f97108ea616dd7 (patch)
treeeb47d816152361a700e7c5a713a2db4085ecf2a2 /doc
parent6bfa8546bbdf6dd644a65876135893339b767bba (diff)
downloadzig-e35d49c4d03ea7a84a2d588be8f97108ea616dd7.tar.gz
zig-e35d49c4d03ea7a84a2d588be8f97108ea616dd7.zip
Unicode escapes: documentation and grammar
Diffstat (limited to 'doc')
-rw-r--r--doc/langref.html.in13
1 files changed, 4 insertions, 9 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in
index 28d8745a81..60ad76197a 100644
--- a/doc/langref.html.in
+++ b/doc/langref.html.in
@@ -566,7 +566,7 @@ test "string literals" {
assert(normal_bytes.len == 5);
assert(normal_bytes[1] == 'e');
assert('e' == '\x65');
- assert('\U01f4a9' == 128169);
+ assert('\u{1f4a9}' == 128169);
assert(mem.eql(u8, "hello", "h\x65llo"));
// A C string literal is a null terminated pointer.
@@ -616,12 +616,8 @@ test "string literals" {
<td>hexadecimal 8-bit character code (2 digits)</td>
</tr>
<tr>
- <td><code>\uNNNN</code></td>
- <td>hexadecimal 16-bit Unicode character code UTF-8 encoded (4 digits)</td>
- </tr>
- <tr>
- <td><code>\UNNNNNN</code></td>
- <td>hexadecimal 24-bit Unicode character code UTF-8 encoded (6 digits)</td>
+ <td><code>\u{NNNNNN}</code></td>
+ <td>hexadecimal Unicode character code UTF-8 encoded (1 or more digits)</td>
</tr>
</table>
</div>
@@ -10008,8 +10004,7 @@ eof &lt;- !.
hex &lt;- [0-9a-fA-F]
char_escape
&lt;- "\\x" hex hex
- / "\\u" hex hex hex hex
- / "\\U" hex hex hex hex hex hex
+ / "\\u{" hex+ "}"
/ "\\" [nr\\t'"]
char_char
&lt;- char_escape