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

Implement UnboundLocalError #30

Closed
wants to merge 3 commits into from
Closed

Conversation

yryuvraj
Copy link
Contributor

@yryuvraj yryuvraj commented Nov 7, 2023

Resolves #1

Note : There might be some faults in the code. Please review and suggest changes.

@tusharsadhwani tusharsadhwani changed the title ci: Implemented UnboundLocalError Implement UnboundLocalError Nov 10, 2023
@tusharsadhwani
Copy link
Owner

tusharsadhwani commented Nov 10, 2023

  • The scope checker should be called in the main function inside interpreter.py, not here.
  • An ast.NodeVisitor will not work because we aren't using Python AST nodes, we have our own AST. To get a visitor, create a Visitor class (in a new visitor.py file) and move the visit() method from Interpreter into that class.
  • Nodes currently don't have a line and column field.

Lot of mistakes here, I haven't properly looked at the visitor logic yet.

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.

UnboundLocalError not implemented
2 participants