mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-17 23:28:15 +01:00
698ff1ca46
We may need parentheses around an argument-less yield to distinguish (yield) - $a from yield -$a and similar. Treat argument-less yield like a prefix operator. This will print parentheses a bit more often than is really required, because the arity ambiguity only exists for certain operators. This seems like a reasonably good approximation through, as it only affects argument-less yield on the LHS of infix operators.