lcompilers / lpython

Python compiler
https://lpython.org/
Other
1.37k stars 156 forks source link

Printing top-level Expressions #2716

Closed Vipul-Cariappa closed 1 month ago

Vipul-Cariappa commented 1 month ago

Example:

❯ lp 
>>> i: i32 = 9
>>> i * i
81
>>> i ** i
387420480

I have rebased this branch of #2713.

Vipul-Cariappa commented 1 month ago

cc @Shaikh-Ubaid

Shaikh-Ubaid commented 1 month ago

Please mark as "Ready for review" when ready.

Shaikh-Ubaid commented 1 month ago

Also, I think we have some previous discussion about printing top-level expressions. Would you mind linking that PR here so that others can have a better context about this?

Vipul-Cariappa commented 1 month ago

Also, I think we have some previous discussion about printing top-level expressions. Would you mind linking that PR here so that others can have a better context about this?

We discussed this in #2698. I had implemented some of this in that PR. That PR lacked tests. We also merged other changes between that PR and this. I was thinking of closing that PR without merging it once we merge this PR.