Open
Conversation
kmr-srbh
reviewed
Jan 18, 2025
Contributor
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.
Author
|
In LFortran ASR, Also for I think this should be done after libasr in LPython is synced to LFortran. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.