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
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
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:]