-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Destructuring #473
Destructuring #473
Conversation
bugged... probably due to a gramar issue
now it's in the correct order as described in the issue
Also added the default (`?`) in the gramar but ignored by the interpreter
works, should be tested (add cases in the testsuite)
…inded by previous matches
now `fold` the matches. Code is cleaner and a bit more efficiant
…nested patterns encontred
NOTE: new dev dependancy (duplicate) to avoid duplication of code in the test suite. Check `tests/destructuring.rs` for an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM globally, but I left a good chunk of comments and nitpicks. Also, your tests always start with an empty line, for some reason.
The more I think about it, and the more I imagine we will want to have strict checks instead of relying on lazy contracts for pattern matching, for early error reporting. But we decided to go this route because this was easier, and for now, this will do.
cleaning - doc clarification - remove useless `.clone()` - Mor clear name for `QuestionMark` tocken Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
- Doc improvements. - Code cleaning. - Drop some useless values clones. - rename `drop_fields` to `bind_open_field` more meaningfull name
simply added as `Dyn`
now a top level let can not be a `Pattern` anymore. if you write a pattern, the repl wil wait for the folowing part of a standart `let ... = ... in ...` expression. Also clean the metavalue generation for default annot.
…s arm can actualy be reached.
relate to #81
Full implementation of the record destructuring as described in #81 . The list destructuring is not implemented yet.
Typechecking is not performed at this time. will be done in future PR