-
Notifications
You must be signed in to change notification settings - Fork 223
[[ Bug 16941 ]] Implement escaped literals #5781
base: develop
Are you sure you want to change the base?
Conversation
@montegoulding, thanks for your PR! By analyzing the history of the files in this pull request, we identified @livecodefraser and @livecodeali to be potential reviewers. |
Probably should add support for |
fccfb41
to
2fda159
Compare
Added |
2fda159
to
3aef1f4
Compare
The implementation of |
This patch implements escaped literals wrapped in single quotes. For example: put 'foo\n"bar"' Equals: foo "bar" This patch has the side effect that `'` is no longer an acceptable char in an identifier.
3aef1f4
to
7664b39
Compare
OK - I gotta admit that's impresive. I do echo Mike's concern, though, that things like Windows UNC formats like "C:\user\docs\textLetter.txt" not get get mangled in transit. |
Well |
Ah... I missed that. Escaping is within single quotes, not double quotes. I expect there may be some user confusion ahead since the two aren't completely interchangeable, but it does very neatly get around any backwards compatibility issues and allow embedding at the same time. Nice. |
@mwieder as it's not likely this PR will be accepted then there really won't be any chance for user confusion... having said that the whole point of single quotes is to create strings that aren't the same as can be in double quotes even if that is just the double quote char permitted and not escapes. I don't really see the point of offering a solution only for quotes though. I'd rather leave things as they are until I can have a proper solution allowing me to embed return & tab & quote and so on in a constant declaration. |
Can we revive this PR and discussion now (three years later)? |
I'd be surprised if we did ;-) |
This patch implements escaped literals wrapped in single
quotes. For example:
Equals:
This patch has the side effect that
'
is no longer anacceptable char in an identifier.
Just leaving this here for discussion at the moment. Paging @runrevmark