Skip to content

Commit 69f651c

Browse files
committed
fix allowing empty {Ascii,Byte}Escape
Because of the leading pipe, |, these categories were permitted to be empty: AsciiEscape ::= | $$\0$$ | $$\"$$ .. Because of that, CharacterLiteral was also allowed to be empty: CharacterLiteral ::= $$'$$ CharacterContent $$'$$ CharacterContent ::= AsciiEscape | CharacterLiteralCharacter | UnicodeEscape Same for ByteEscape and ByteLiteral. These were the only two categories: $ rg -U '::=\n +\|' | wc -l 0
1 parent 61713ca commit 69f651c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lexical-elements.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ Byte Literals
574574
| ByteEscape
575575
576576
ByteEscape ::=
577-
| $$\0$$
577+
$$\0$$
578578
| $$\"$$
579579
| $$\'$$
580580
| $$\t$$
@@ -1102,7 +1102,7 @@ Character Literals
11021102
| UnicodeEscape
11031103
11041104
AsciiEscape ::=
1105-
| $$\0$$
1105+
$$\0$$
11061106
| $$\"$$
11071107
| $$\'$$
11081108
| $$\t$$

0 commit comments

Comments
 (0)