Skip to content

Conversation

@DominicPM
Copy link
Contributor

  • Make pattern translations total and tolerate wrapper forms to avoid Match in
    the bcase frontend.
  • Allow nested patterns in constructor args by expanding collection/translation
    logic in Basic_Case_Expression.
  • Normalize tuple patterns into Pair/TNil shape in the shallow match frontend.
  • Improve shallow match arg translation to distinguish bindings vs constructors
    and handle nested tuple patterns.
  • Add nested-pattern showcase/regression tests (Option/Result, tuples, wildcards,
    if-let and let-else forms).

Closes #65.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- Make pattern translations total and tolerate wrapper forms to avoid Match in
  the bcase frontend.
- Allow nested patterns in constructor args by expanding collection/translation
  logic in Basic_Case_Expression.
- Normalize tuple patterns into Pair/TNil shape in the shallow match frontend.
- Improve shallow match arg translation to distinguish bindings vs constructors
  and handle nested tuple patterns.
- Add nested-pattern showcase/regression tests (Option/Result, tuples, wildcards,
  if-let and let-else forms).

Closes awslabs#65.

Signed-off-by: Dominic Mulligan <dominic.p.mulligan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add nested pattern support in Micro Rust patterns

1 participant