| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@Shaikh-Ubaid could you please rerun the CI? The failing check is unrelated to the PR. |
Sorry, something went wrong.
|
The approach in this PR might break lfortran. lfortran needs to not print spaces when two consecutive print arguments are strings. % cat examples/expr2.f90
program expr2
implicit none
print *, "hi", "bye"
print *, 12, 23
end program
% gfortran examples/expr2.f90
% ./a.out
hibye
12 23
% lfortran examples/expr2.f90
hibye
12 23 |
Sorry, something went wrong.
| if (global_sep_space && | ||
| !(ASRUtils::is_character(*ASRUtils::expr_type(x.m_values[i])) | ||
| && ASRUtils::is_character(*ASRUtils::expr_type(x.m_values[i - 1])))) { | ||
| if (global_sep_space) { |
There was a problem hiding this comment.
The way to fix this such that we print spaces when two consecutive arguments are strings in LPython and not print spaces for the same in LFortran, is to support this in AST->ASR Translation.
Sorry, something went wrong.
There was a problem hiding this comment.
You will need to figure out how to update the middle-ends of both lfortran and lpython such that both of them work as expected when two consecutive arguments are strings.
Sorry, something went wrong.
There was a problem hiding this comment.
@Shaikh-Ubaid thanks for this! I will try to create a solution that works for both. 👍
Sorry, something went wrong.
There was a problem hiding this comment.
See if your solution works for both lpython and lfortran (test it locally on your system or send a PR to lfortran so it gets tested at the CI). If no run reference tests change for lfortran, then it works.
You can also test your current approach with lfortran. If it works currently, then I think its good.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
fixes #2669