cl-parser: Dedicated parsing logic for patterns!

This commit is contained in:
2025-05-18 04:00:00 -04:00
parent e6156343c3
commit 3e2063835b
11 changed files with 100 additions and 4 deletions

View File

@@ -468,6 +468,7 @@ impl Display for Pattern {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Pattern::Name(sym) => sym.fmt(f),
Pattern::Path(path) => path.fmt(f),
Pattern::Literal(literal) => literal.fmt(f),
Pattern::Rest(Some(name)) => write!(f, "..{name}"),
Pattern::Rest(None) => "..".fmt(f),