summaryrefslogtreecommitdiffstats
path: root/src/poem/read
diff options
context:
space:
mode:
authorRory Dudley2024-09-01 04:27:00 -0600
committerRory Dudley2024-09-01 04:27:00 -0600
commit49676c0e1c5fd0660edfd73cfd97001a00b7bd8b (patch)
tree140bbb0a79252dabbe9535f9b7eaa31ad6ee701e /src/poem/read
parent0596517643d9daffa1c4b7b3b0f913ac6d1ab9cd (diff)
parentd03b4643c9c4f85c642182da7a56a613b6f819d4 (diff)
downloaddwarvish-49676c0e1c5fd0660edfd73cfd97001a00b7bd8b.tar.gz
Merge branch 'main' into escsq
Diffstat (limited to 'src/poem/read')
-rw-r--r--src/poem/read/parse.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/poem/read/parse.rs b/src/poem/read/parse.rs
index fc1979f..0b6c5a3 100644
--- a/src/poem/read/parse.rs
+++ b/src/poem/read/parse.rs
@@ -74,6 +74,14 @@ macro_rules! string {
$word.push('\x0e');
$i += 1;
}
+ Some(c) if c == '\\' => {
+ let c = match $chars.next() {
+ Some(c) => c,
+ None => continue,
+ };
+ $word.push(c);
+ $i += 1;
+ }
Some(c) => {
$word.push(c);
$i += 1;
@@ -108,6 +116,14 @@ macro_rules! poem {
match $chars.next() {
None => return Err(Mishap::PartialMishap($j, $i, $c)),
Some(c) if c == token => break,
+ Some(c) if c == '\\' => {
+ let c = match $chars.next() {
+ Some(c) => c,
+ None => continue,
+ };
+ $word.push(c);
+ $i += 1;
+ }
Some(c) => {
poetry.push(c);
$i += 1;