-
Notifications
You must be signed in to change notification settings - Fork 105
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
add deconstructor in function argument #245
Conversation
Some tests would be good @TheIronBorn |
retry |
Sorry. I've been slow on this because I found it breaks |
@TheIronBorn whats the update on this PR? |
retry |
I couldn't find a decent way to do this without just adding a lot of exceptions, or overhauling how we match function arguments. Function arguments can be A LOT:
|
I suppose a place to start is a pattern binding syntax context. |
There's some formal grammer for it here https://doc.rust-lang.org/grammar.html#variable-declarations. So I guess I'll start working on that. Talked myself into it lol |
That grammar is pretty old. The following might provide better information on the grammar.
|
It would be really nice to reuse our other pattern matching code, but if we're going to be highlighting the parameter names as |
you can override things with a prototype, might work 😀 |
Something like:
Hmm might work. |
This matches things like this now:
I don't know if this is the right way to solve it. Some more tests might also be in order