summaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2024-04-26 00:05:26 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2024-04-26 00:07:16 +0200
commit175c790cc730c01283c1aa0cf65cfce8c7152d4b (patch)
tree8add9a9dee38c1e0624e59a6cf08b3e118749530 /crates
parent6ada7a8a5edc6123f35205c047e274113a0f8b2c (diff)
downloadrebel-175c790cc730c01283c1aa0cf65cfce8c7152d4b.tar
rebel-175c790cc730c01283c1aa0cf65cfce8c7152d4b.zip
rebel-parse: tokenize: allow escaping '{' characters
Diffstat (limited to 'crates')
-rw-r--r--crates/rebel-parse/src/grammar/tokenize.rs1
1 files changed, 1 insertions, 0 deletions
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()