From 175c790cc730c01283c1aa0cf65cfce8c7152d4b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 26 Apr 2024 00:05:26 +0200 Subject: rebel-parse: tokenize: allow escaping '{' characters --- crates/rebel-parse/src/grammar/tokenize.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates') diff --git a/crates/rebel-parse/src/grammar/tokenize.rs b/crates/rebel-parse/src/grammar/tokenize.rs index 841e61b..7eddebc 100644 --- a/crates/rebel-parse/src/grammar/tokenize.rs +++ b/crates/rebel-parse/src/grammar/tokenize.rs @@ -63,6 +63,7 @@ peg::parser! { / "t" { '\t' } / "\\" { '\\' } / "\"" { '"' } + / "{" { '{' } / "0" { '\0' } / "x" digits:$(['0'..='7'] hex_digit()) { u8::from_str_radix(digits, 16).unwrap().into() -- cgit v1.2.3