php-parser
php-parser copied to clipboard
Fix problem with heredoc parsing \n as newlines, not as literal string
I am trying to fox #1130 however need some help with this one, for the prettier plugin we want to keep the original intent, and not parse the \n as a newline, so we can rebuild the original string in the output.
Do I create a special AST token for \n in a HEREDOC, or should ignore the \n as a special case, and parse it as a regular string?
Hmm, I don't have any intuition on this. Might be worth checking how this is handled in https://github.com/nikic/PHP-Parser?