-
Notifications
You must be signed in to change notification settings - Fork 164
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
ASR -> CPython: Add visitors for ListConstant
, TupleConstant
& SetConstant
#2690
ASR -> CPython: Add visitors for ListConstant
, TupleConstant
& SetConstant
#2690
Conversation
@Shaikh-Ubaid what are your thoughts on this, is this the right way to do it? Could you please guide me on adding tests for this? |
ListConstant
visitor for CPythonListConstant
visitor
Regarding tests, I think you enable tests for python in tests.toml and search for list1.py and add python=true. |
And please make sure the generated python code and tests matches the same line by line. I mean, manually verify the output is the same as the test code. |
Yes, let's just add one reference test that includes all three |
@Shaikh-Ubaid @nikabot since the visitors will be similar for 3 of 4 data-structures, shall I implement them and test them together? I think it would be fast this way. For |
Yes. |
913e293
to
1c8a7e6
Compare
ListConstant
visitorListConstant
, TupleConstant
& SetConstant
@Shaikh-Ubaid @nikabot what can be a better name for the test file? |
|
Generated code verified using CPython interpreter v3.10.13. |
@kmr-srbh the generated code does not work with CPython. There are couple things we will need to fix for it to work.
The above should be tackled in different PR and should not be part of this PR. |
You are right @Shaikh-Ubaid. I had planned to look into this to get the CPython back-end working. A separate PR will be good! 👍 |
I tested the code for syntax errors using this. |
TODO