Let grammar escape backslashes (#5865)

This commit is contained in:
altoiddealer 2024-05-19 19:26:09 -04:00 committed by GitHub
parent 907702c204
commit 818b4e0354
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,6 +131,8 @@ def parse_char(src):
return "\n", src[2:] return "\n", src[2:]
elif esc == "t": elif esc == "t":
return "\t", src[2:] return "\t", src[2:]
elif esc == "\\":
return "\\", src[2:]
raise RuntimeError("unknown escape at " + src) raise RuntimeError("unknown escape at " + src)
elif src: elif src:
return src[0], src[1:] return src[0], src[1:]