lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Fix separator inside print

Open xaerru opened this issue 11 months ago • 1 comments

Fix #2677 and #2668.

I think global_sep_space isn'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_space was used.

When the if condition of two consecutive non characters was false, the empty separator was being pushed.

xaerru avatar Jan 18 '25 16:01 xaerru

In LFortran ASR, Print node was refactored to only contain StringFormat or a single StringConstant.

Also for StringFormat, only FormatFortran is implemented as of now.

https://github.com/lfortran/lfortran/issues/2543

https://github.com/lfortran/lfortran/pull/4696

I think this should be done after libasr in LPython is synced to LFortran.

xaerru avatar Jan 19 '25 09:01 xaerru