Skip to content

Commit c05d941

Browse files
Byte literal and string syntax: add missing quote escapes
Current definitions of byte characters and byte literals do not allow escaped single and double quotes. Updated lexical syntax for byte characters and strings to allow these characters. This is in sync with the implementation.
1 parent 0dbb131 commit c05d941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tokens.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ r##"foo #"# bar"##; // foo #"# bar
235235
>
236236
> BYTE_ESCAPE :\
237237
>       `\x` HEX_DIGIT HEX_DIGIT\
238-
>    | `\n` | `\r` | `\t` | `\\` | `\0`
238+
>    | `\n` | `\r` | `\t` | `\\` | `\0` | `\'` | `\"`
239239
240240
A _byte literal_ is a single ASCII character (in the `U+0000` to `U+007F`
241241
range) or a single _escape_ preceded by the characters `U+0062` (`b`) and

0 commit comments

Comments
 (0)