Skip to content

Commit dbc4ab8

Browse files
committed
Use a repetition notation for unicode escapes to make it smaller.
1 parent 2f8877d commit dbc4ab8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/tokens.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,7 @@ evaluated (primarily) at compile time.
9797
>    | `\n` | `\r` | `\t` | `\\` | `\0`
9898
>
9999
> UNICODE_ESCAPE :
100-
> &nbsp;&nbsp; &nbsp;&nbsp; `\u{` HEX_DIGIT `_`<sup>\*</sup> `}`
101-
> &nbsp;&nbsp; | `\u{` HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> `}`
102-
> &nbsp;&nbsp; | `\u{` HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> `}`
103-
> &nbsp;&nbsp; | `\u{` HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> `}`
104-
> &nbsp;&nbsp; | `\u{` HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> `}`
105-
> &nbsp;&nbsp; | `\u{` HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> HEX_DIGIT `_`<sup>\*</sup> `}`
100+
> &nbsp;&nbsp; `\u{` ( HEX_DIGIT `_`<sup>\*</sup> )<sup>1..6</sup> `}`
106101
107102
A _character literal_ is a single Unicode character enclosed within two
108103
`U+0027` (single-quote) characters, with the exception of `U+0027` itself,
@@ -123,7 +118,6 @@ which must be _escaped_ by a preceding `U+005C` character (`\`).
123118
> STRING_CONTINUE :
124119
> &nbsp;&nbsp; `\` _followed by_ \\n
125120
126-
127121
A _string literal_ is a sequence of any Unicode characters enclosed within two
128122
`U+0022` (double-quote) characters, with the exception of `U+0022` itself,
129123
which must be _escaped_ by a preceding `U+005C` character (`\`).
@@ -264,7 +258,6 @@ following forms:
264258
> ASCII :
265259
> &nbsp;&nbsp; _any ASCII (i.e. 0x00 to 0x7F)_
266260
267-
268261
Raw byte string literals do not process any escapes. They start with the
269262
character `U+0062` (`b`), followed by `U+0072` (`r`), followed by zero or more
270263
of the character `U+0023` (`#`), and a `U+0022` (double-quote) character. The

0 commit comments

Comments
 (0)