From 818b4e0354bf77717d219c73f4e54158a3bb12a1 Mon Sep 17 00:00:00 2001 From: altoiddealer Date: Sun, 19 May 2024 19:26:09 -0400 Subject: [PATCH] Let grammar escape backslashes (#5865) --- modules/grammar/grammar_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/grammar/grammar_utils.py b/modules/grammar/grammar_utils.py index 140748d5..7f09ff82 100644 --- a/modules/grammar/grammar_utils.py +++ b/modules/grammar/grammar_utils.py @@ -131,6 +131,8 @@ def parse_char(src): return "\n", src[2:] elif esc == "t": return "\t", src[2:] + elif esc == "\\": + return "\\", src[2:] raise RuntimeError("unknown escape at " + src) elif src: return src[0], src[1:]