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

@@ -508,6 +508,7 @@ pub mod clangify {
// TODO: Pattern match desugaring!!!
match self {
Pattern::Name(name) => y.p(name),
Pattern::Path(path) => y.p(path),
Pattern::Literal(literal) => y.p(literal),
Pattern::Rest(name) => y.p("..").p(name),
Pattern::Ref(mutability, pattern) => y.p("&").p(mutability).p(pattern),