Use direct matching in mixed quoted text hook

This commit is contained in:
2026-09-24 18:57:41 -07:00
parent 6b0ef99eca
commit 97a8703adc
2 changed files with 10 additions and 7 deletions
+4 -7
View File
@@ -1221,14 +1221,11 @@ impl Parser<'_> {
return Err(self.error("Expected a double-quoted string."));
}
#[cfg(test)]
if self.mixed.is_some() {
let span = self.current().span;
let span = self.current().span;
#[cfg(test)]
if let Some(mixed) = &mut self.mixed {
let raw = &self.source[span.start..span.end];
let value = self
.mixed
.as_mut()
.expect("mixed quoted consumer")
.quoted_text(raw, span)?;
let value = mixed.quoted_text(raw, span)?;
self.cursor += 1;
return Ok(value);
}
@@ -24,3 +24,9 @@ All new names are under `mixed::carried::text_producer`, selected by filter `tex
- Project and typed duplicate descriptions with enough room for the first grammar decode but not a second, asserting the existing duplicate errors rather than a false successful overwrite.
No old test or worker-stack allowance changed. Implementer ran no Cargo, test executable or rustfmt; parent owns formatting, compiler, prologue/headroom and runtime gates. Independent production review found no initial semantic blocker; final review binds parent-formatted source and authored tests before commit. Preserve all prior recorded failures and compare actual full-suite dispositions rather than claiming they are unchanged from source inspection.
Parent gates at initial source6b0ef99 passed all six focused tests and completed
the full library with259 passed /16 inherited failures. Strict Clippy rejected
the ordinary quoted hook's is_some/expect pattern. The successor uses direct
if-let matching with the same token span and decoder; no tests, limits or
accounting operations changed. Final source gates remain separately required.