-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PrettyPrinter: added option shortListSyntax
#859
Conversation
As this is a separate node, you can already control this by passing in either |
@nikic list is not array, like as attribute not comment( |
This is the current representation though:
|
@nikic I'm understand you, but this is still not correct and may cause problems at printing |
@nikic for example if |
That's a good point. It may make sense to change the representation then (see also #471). A possibility is to invert things and always parse the LHS of assignments into a |
Yes, can you fix it? I not explored code of parsers yet. Let me know when it's ready so I can adjust my PR |
With 68fc1ba |
@nikic "short array destructuring" in PHP documentation called "symmetric array destructuring" |
As I have already explained, I have no interest in supporting a separate option for this. You can already use phpVersion to control the default behavior, and flags on individual nodes to control precise behavior. The |
To print
[...]
instead oflist(...)