Title: [Parser] Expression tree is not properly generated in `FormattedValue` · Issue #641 · lcompilers/lpython · GitHub
Open Graph Title: [Parser] Expression tree is not properly generated in `FormattedValue` · Issue #641 · lcompilers/lpython
X Title: [Parser] Expression tree is not properly generated in `FormattedValue` · Issue #641 · lcompilers/lpython
Description: FormattedValue field of a fstring does not generate a proper expression tree for the expression inside it. Example - $ cat examples/expr2.py f''' a is {a} b is {b} sum is {a + b} ''' $ lpyast examples/expr2.py (Module [(Expr (JoinedStr [...
Open Graph Description: FormattedValue field of a fstring does not generate a proper expression tree for the expression inside it. Example - $ cat examples/expr2.py f''' a is {a} b is {b} sum is {a + b} ''' $ lpyast examp...
X Description: FormattedValue field of a fstring does not generate a proper expression tree for the expression inside it. Example - $ cat examples/expr2.py f''' a is {a} b is {b} sum is {a + b} '&...
Opengraph URL: https://github.com/lcompilers/lpython/issues/641
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Parser] Expression tree is not properly generated in `FormattedValue`","articleBody":"`FormattedValue` field of a fstring does not generate a proper expression tree for the expression inside it.\r\n\r\nExample -\r\n\r\n```console\r\n$ cat examples/expr2.py\r\nf'''\r\na is {a}\r\nb is {b}\r\nsum is {a + b}\r\n'''\r\n$ lpyast examples/expr2.py\r\n(Module [(Expr (JoinedStr [(ConstantStr \"\r\na is \" ()) (FormattedValue (Name a Load) -1 ()) (ConstantStr \"\r\nb is \" ()) (FormattedValue (Name b Load) -1 ()) (ConstantStr \"\r\nsum is \" ()) (FormattedValue (BinOp (Name a Load) Add (Name b Load)) -1 ()) (ConstantStr \"\r\n\" ())]))] [])\r\n$ lpynewpar examples/expr2.py\r\n(Module [(Expr (JoinedStr [(ConstantStr \"\r\na is \" ()) (FormattedValue (Name a Load) -1 ()) (ConstantStr \"\r\nb is \" ()) (FormattedValue (Name b Load) -1 ()) (ConstantStr \"\r\nsum is \" ()) (FormattedValue (Name a + b Load) -1 ()) (ConstantStr \"\r\n\" ())]))] [])\r\n```","author":{"url":"https://github.com/akshanshbhatt","@type":"Person","name":"akshanshbhatt"},"datePublished":"2022-06-20T06:21:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/641/lpython/issues/641"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:37c4f0a2-f8b2-f868-a47a-df61f05fb388 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 958E:121520:4DACD4:659BA7:696B6D89 |
| html-safe-nonce | ed0fdeb975711530dcdbf21a15fa9fb8e0f7cc6bc651ee61892d0cc08abb46e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NThFOjEyMTUyMDo0REFDRDQ6NjU5QkE3OjY5NkI2RDg5IiwidmlzaXRvcl9pZCI6IjQxNjMxNzE4MDI0NzQ1NzMxOTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e51b05b16ed48335ec88ac83f980340c225747dab58632c67cb050b4207e7714 |
| hovercard-subject-tag | issue:1276425525 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lcompilers/lpython/641/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3e544d94c60e95b11e682ad5ae8f71c25597e53f7ca9317e873ad15f04cabd56/lcompilers/lpython/issues/641 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3e544d94c60e95b11e682ad5ae8f71c25597e53f7ca9317e873ad15f04cabd56/lcompilers/lpython/issues/641 |
| og:image:alt | FormattedValue field of a fstring does not generate a proper expression tree for the expression inside it. Example - $ cat examples/expr2.py f''' a is {a} b is {b} sum is {a + b} ''' $ lpyast examp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | akshanshbhatt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/lcompilers/lpython git https://github.com/lcompilers/lpython.git |
| octolytics-dimension-user_id | 96538276 |
| octolytics-dimension-user_login | lcompilers |
| octolytics-dimension-repository_id | 442864346 |
| octolytics-dimension-repository_nwo | lcompilers/lpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 442864346 |
| octolytics-dimension-repository_network_root_nwo | lcompilers/lpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width