better parsing

This commit is contained in:
Jana Dönszelmann 2026-04-03 16:47:18 +02:00
parent bed1d5b38b
commit 53fc09c02f
No known key found for this signature in database
10 changed files with 416 additions and 45 deletions

View file

@ -126,7 +126,17 @@ impl<'a> Display for Path<'a> {
impl<'a> Display for Number<'a> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0)
let Self {
number,
suffix_without_underscore,
} = self;
write!(f, "{number}")?;
if let Some(suffix) = suffix_without_underscore {
write!(f, "_")?;
write!(f, "{suffix}")?;
}
Ok(())
}
}