| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Yes, please add tests
Sorry, something went wrong.
| if (x.m_start) { | ||
| r += "["; | ||
| visit_expr(*x.m_start); | ||
| r += s; | ||
| } | ||
| if (x.m_end) { | ||
| r += ":"; | ||
| visit_expr(*x.m_end); | ||
| r += s; | ||
| } | ||
| if (x.m_step) { | ||
| r += ":"; | ||
| visit_expr(*x.m_step); | ||
| r += s; | ||
| r += "]"; | ||
| } else { | ||
| r += "]"; | ||
| } |
There was a problem hiding this comment.
| if (x.m_start) { | |
| r += "["; | |
| visit_expr(*x.m_start); | |
| r += s; | |
| } | |
| if (x.m_end) { | |
| r += ":"; | |
| visit_expr(*x.m_end); | |
| r += s; | |
| } | |
| if (x.m_step) { | |
| r += ":"; | |
| visit_expr(*x.m_step); | |
| r += s; | |
| r += "]"; | |
| } else { | |
| r += "]"; | |
| } | |
| r += "["; | |
| if (x.m_start) { | |
| visit_expr(*x.m_start); | |
| r += s; | |
| } | |
| r += ":"; | |
| if (x.m_end) { | |
| visit_expr(*x.m_end); | |
| r += s; | |
| } | |
| if (x.m_step) { | |
| r += ":"; | |
| visit_expr(*x.m_step); | |
| r += s; | |
| } | |
| r += "]"; |
I suggested this changes because of the following cases:
s: str = "12345" print(s[:]) print(s[3:]) print(s[3:4:])
Sorry, something went wrong.
There was a problem hiding this comment.
Leave comment for proper understanding of code.
Sorry, something went wrong.
| s = r; | ||
| } | ||
|
|
||
| void visit_StringFormat(const ASR::StringFormat_t &x) { |
There was a problem hiding this comment.
Does LPython represents StringFormat in the ASR? (If we don't support, let's implement this later? )
I think we don't properly support f-strings yet.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, I added these because there is an entry for StringFormat. Here:
Line 305 in 7aa7084
Do you think we should keep it? Thanks
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, we have an entry in ASR.asdl, but LPython doesn't utilise it yet.
So, I think let's remove it for now. And handle it correctly once LPython supports f-strings.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.