aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex/simple.rs
diff options
context:
space:
mode:
authorJonas Maier <jonas@x77.dev>2026-06-06 22:35:32 +0200
committerJonas Maier <jonas@x77.dev>2026-06-06 22:35:32 +0200
commit6b452e817090dba6c80454a42079fa5c9f83b1cd (patch)
tree70645faa7aef2068ad07ade092e168613727713a /src/regex/simple.rs
parenta0376d361b83360c6f9eb971419726995f4c9c19 (diff)
downloadpish-6b452e817090dba6c80454a42079fa5c9f83b1cd.tar.gz
regex: only named matches now
Diffstat (limited to 'src/regex/simple.rs')
-rw-r--r--src/regex/simple.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regex/simple.rs b/src/regex/simple.rs
index 4286322..3f0bf30 100644
--- a/src/regex/simple.rs
+++ b/src/regex/simple.rs
@@ -69,7 +69,7 @@ impl RegexEngine for Nothing {
Pattern::Rep(_, x, Some(y), _) if y < x => Ok(Nothing),
Pattern::Rep(_, 0, None, _) => Err(NotASimpleNothing),
Pattern::Rep(pat, _gt_0, _, _) => Self::compile(*pat),
- Pattern::Submatch(pat) => Self::compile(*pat),
+ Pattern::Submatch(_, pat) => Self::compile(*pat),
_ => Err(NotASimpleNothing),
}
}
@@ -109,7 +109,7 @@ fn ce(pat: Pattern) -> Option<Vec<u8>> {
None
}
}
- Pattern::Submatch(_) => None, // TODO: submatches could be stored as constant offsets
+ Pattern::Submatch(_, _) => None, // TODO: submatches could be stored as constant offsets
Pattern::Nothing => Some(Vec::new()),
_ => None,
}