-
Notifications
You must be signed in to change notification settings - Fork 35
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
Allow to control trailing tokens when doing layer unpacking #21
Comments
This one is listed on the roadmap issue #3. Basically we need an expander called Or maybe we need syntax support on the current unpacking syntax to indicate how to make delimiters behave. |
Expanders are declared here, btw https://github.com/marcioAlmada/yay/blob/master/src/expanders.php. They are just functions that receive a Tests for expanders are here: https://github.com/marcioAlmada/yay/tree/master/tests/phpt/expanders |
@marcioAlmada What do you think about an IRC channel on freenode? Would you mind if I implemented some of the easy picks? |
I'm currently in transit |
Ah okay. Safe travels! |
|
this has the intent intent to fix issue #21
Turns out adding first class trailing token control to the already existing unpacking syntax |
this has the intent to fix issue #21
In a macro expansion such as
It is impossible to specify the correct amount of commas (to my knowledge of YAY functionality) - the last match will always add a trailing comma which is invalid syntax.
On function calls this can be alleviated by using array destructuring ...[var, var, var, ] but function definitions do not have this workaround.
The text was updated successfully, but these errors were encountered: