Example we have $a= "foo\nbar":
value = foo\nbar;
raw = "foo\\nbar"
All popular parser do this https://astexplorer.net/#/gist/070b3c0b39f0af268d909e3ba9efa2a3/2ba4c9d3ab6b3e3cf31f6148a28966c638948790
Ref: https://github.com/prettier/plugin-php/pull/57
Thanks!
Hi @evilebottnawi,
I agree with you as you can loos information without the raw attribute :

@ichiriac need help?
yes, any help would be verry appreciated
@ichiriac raw or rawValue property?
I vote for raw - more concise
@ichiriac can you help with this? we have a lot of work in prettier, it is problem have maximum priority
Also strange:
a = 'You deleted C:\\*.*?';
Contain: You deleted C:\*.*?
Not sure yet on single quotes, but \ is for escaping, so \\ resolves as a single \ - have a try on php cli but i'm almost sure it's correct
this feature is now implemented over literals nodes including :
I need to better cover them with tests, I'll do it later
Most helpful comment
I vote for
raw- more concise