feat: implement pattern matching through is/match expressions and destructuring - #14
Merged
Conversation
- Add parsing, representation, and evaluation support for `match` expressions. - Implement the `enumerate` iterator combinator for enhanced iteration capabilities. - Replace identifiers for keywords with `KW` suffix for consistency in `SyntaxKind`. - Update `STMT`, `PATTERN`, and related sets to reflect changes in syntax representation. - Refactor destructuring logic to handle `match` patterns, with support for guards. - Extend test coverage and add examples showcasing `match` expression functionality.
…teral parsing
- Replace `block_or_lambda` with `expr_with_braces` to simplify brace-handling logic.
- Update brace-handling to support blocks, lambdas, map literals, and destructuring assignments.
- Refactor `map` parsing to handle empty map literals explicitly and improve shorthand syntax.
- Deprecate `Hash` prefix for map literals (`#{}` → `{}`) for consistency with other syntax.
- Introduce `E0311` diagnostic for mismatched bindings within `match` arm patterns.
- Extend parser and test coverage for new brace-handling capabilities and error scenarios.
…ling - Introduce `is` expressions with support for type-based pattern matching and typed bindings. - Add support for flow scopes to handle temporary variables within expressions. - Refactor conditional expression parsing to allow omitting parentheses in conditions. - Deprecate parentheses in conditions with a warning for compatibility. - Extend parser, evaluator, and syntax definitions to support new features and improve error diagnostics. - Update test cases and examples to demonstrate `is` expressions and scope improvements.
…in conditions - Refactor delimiter error reporting for better accuracy and cleaner code. - Deprecate parentheses in conditions (`if`, `while`, `for`) with warnings for compatibility. - Update test cases, examples, and error diagnostics to reflect new behaviour.
- Implement map destructuring in bindings, including support for spread (`..`) and binding of remaining keys. - Add error handling for unmatched or missing keys in map destructuring with `E0302` diagnostics. - Enhance pattern matching to support named and unnamed map destructuring patterns.
…iagnostics - Add `E0303` diagnostic for missing keys in map patterns and integrate it into destructuring logic. - Refactor destructuring to provide detailed error messages with hints for unmatched keys and pattern paths. - Improve diagnostics for destructuring nested patterns and guards.
Dutch-Raptor
commented
Jan 19, 2026
refactor: implement compose_doc! tests with doctests instead of compile time tests. require parens around conditions and for expressions
Dutch-Raptor
force-pushed
the
feature/patterns
branch
from
January 23, 2026 18:00
cac1fec to
953c564
Compare
- Limit concurrent runs using workflow grouping and cancellation. - Treat all warnings as errors by setting `RUSTFLAGS`.
…in error code explanations, improve documentation
Dutch-Raptor
force-pushed
the
feature/patterns
branch
from
January 28, 2026 15:19
f1345bf to
ed928c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.