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
Fix print related bugs #3224
Fix print related bugs #3224
Conversation
ASR::expr_t *empty_string = ASRUtils::EXPR(ASR::make_StringConstant_t( | ||
al, loc, s2c(al, ""), str_type_len_0)); | ||
a_values_vec.push_back(al, empty_string); | ||
ASR::asr_t* file_write_asr_t = construct_leading_space(false, loc); |
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.
The leading space should only be inserted if compiler_options.print_leading_space
.
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.
Yes, at the above location, it is inserted when format string is not specified and --print-leading-space
is provided. Do you want to update this to any other logic?
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.
Ah, I missed the compiler_options.print_leading_space
.
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 is fine. If there are bugs, we'll fix them as we find them.
Define and use construct_leading_space()
b3cedd6
to
34caf23
Compare
fixes #3215