-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Printing of Escape Sequences #1500
Conversation
@@ -8,5 +8,5 @@ class a: | |||
" ())] [])) (Expr (ConstantStr " | |||
"\\" | |||
" ())) (Expr (ConstantStr " | |||
'\\' | |||
'\' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked against CPython and this change seems to be correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, thanks for fixing it! I left some minor formatting comments.
Co-authored-by: Ondřej Čertík <ondrej@certik.us>
Thanks @gptsarthak for the fix! |
The obvious edge case to be checked here was for
@gptsarthak Shouldn't be difficult to add this. Thanks ! |
Hey @faze-geek thanks for pointing it out! Now that this PR is merged, should I make another PR after adding it? |
Yes, you can do that! |
Fixes #1473
Modified LPython semantics, C and Julia backend so that they do not print the backslash even after it is recognized.
When asked to print the following string:
LPython now prints:
I said 'Wow'