Skip to content
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

DEV: Sync libasr with LFortran #2827

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

czgdp1807
Copy link
Collaborator

No description provided.

strings_to_be_deallocated.p = strings_to_be_deallocated_copy;
}

void visit_ForEach(const ASR::ForEach_t &x) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this function / node was removed? It might be a specific node in LPython.

@certik
Copy link
Contributor

certik commented Feb 26, 2025

I think there was work in LPython to get various dicts and lists operations working, so it would be good to keep that if we can.

But I think it is more important to sync, and keep it synced after that, so if it is difficult, we can temporarily remove it, and try to add it back later (the proper way: in LFortran first, then update a submodule).

@@ -45,23 +45,23 @@ stmt
| GoToTarget(int id, identifier name)
| If(expr test, stmt* body, stmt* orelse)
| IfArithmetic(expr test, int lt_label, int eq_label, int gt_label)
| Print(expr* values, expr? separator, expr? end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think end and separator are used in python syntax.

if (x.m_separator) {
this->visit_expr(*x.m_separator);
separator = src;
separator = "\" \"";
//HACKISH way to handle print refactoring (always using stringformat).
// TODO : Implement stringformat visitor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep combination of this as we should keep separator and end memebers.

Comment on lines -1190 to -1196
if (x.m_end) {
this->visit_expr(*x.m_end);
tmp_gen += "\%s\"";
v.push_back(src);
} else {
tmp_gen += "\\n\"";
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as well as keeping this.

@czgdp1807 czgdp1807 force-pushed the libasr_sync branch 2 times, most recently from 09d9ff3 to 8045c16 Compare February 27, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants