PHP-Parser
PHP-Parser copied to clipboard
Reproducer for a bug with format-preserving printer that loses parentheses around BooleanNot expressions
This is only a reproducer for the issue reported in #1119
PHP-Parser 5 uses a different way to handle operator precedence in the pretty printer, and it doesn't interact with formatting preservation properly :/
This looks pretty tricky. Previously responsibility for printing the parentheses was with the parent node, now it's with the child. Which only works properly if the child is printed without formatting.