Fix separator inside print#2820
Conversation
kmr-srbh
left a comment
There was a problem hiding this comment.
Thanks for the changes @xaerru! LPython is a sister project of a modern Fortran compiler LFortran. In Fortran, we do not add a space between 2 strings implicitly. We add a space only when either the left value or right value is something other than a string. The deleted code handled the separator based on this criteria.
Please see the discussion at https://github.com/lcompilers/lpython/pull/2670/files#r1581397608 on suggestion to fix this.
Sorry, something went wrong.
|
In LFortran ASR, Also for I think this should be done after libasr in LPython is synced to LFortran. |
Sorry, something went wrong.
Fix #2677 and #2668.
I think
global_sep_spaceisn't needed because we set the sep to" "as the default when it's not specified.I couldn't figure out why that if condition of two consecutive non characters was in place and also why
sep_no_spacewas used.When the if condition of two consecutive non characters was false, the empty separator was being pushed.