Skip to content

Conversation

@fabpot
Copy link
Contributor

@fabpot fabpot commented Nov 28, 2024

This PR simplifies how we escape the ternary operator, and simplifies the whole strategy.
Instead of replacing the PrintNodes, we instead "just" wrap the inner expressions.

For the ternary operator, the InlinePrint expression is useless and even weird as printing something in the middle of an expression looks very wrong. This is not done anymore and the node is deprecated.

Overall, this PR makes fewer changes to the Node tree which should make things use a bit less memory.

@fabpot fabpot merged commit ae82e8b into twigphp:3.x Nov 28, 2024
48 of 49 checks passed
@fabpot fabpot deleted the escaper-node-visitor-simplification branch November 28, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants