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

Implementing import declarations from python through SymTableBuildPass #1344

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

mgtm98
Copy link
Collaborator

@mgtm98 mgtm98 commented Oct 5, 2024

Description

In this pull request, I implemented the ability to import Python declarations (such as classes, variables, and abilities) into Jac. This is done through SymbolTableBuildPass, where the entire Python module specified by ModulePath is added to the Jac AST. The necessary items from this module are identified and stored in py_needed_items. During SymbolTableBuildPass, only these selected items are added to the symbol table.
py_needed_items is defined as an optional dict, if it's None then the whole module is needed and the new support won't work, if the dict has a value then the specified items in the dict are only added in the symbol table.

@mgtm98 mgtm98 requested review from kugesan1105 and marsninja and removed request for kugesan1105 and marsninja October 5, 2024 22:08
@mgtm98
Copy link
Collaborator Author

mgtm98 commented Oct 5, 2024

@marsninja Need to check with you the import of assignment nodes. also need to check the way that I implement the rename of the decls through import aliases

@mgtm98 mgtm98 requested a review from marsninja October 6, 2024 20:11
@mgtm98 mgtm98 removed the request for review from marsninja October 8, 2024 21:25
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.

2 participants