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

Store node reference in visitor's cache. #138

Merged

Conversation

vladaindjic
Copy link
Contributor

Code review checklist

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Commit messages are meaningful (see this for details)
  • Tests have been included and/or updated
  • Docstrings have been included and/or updated, as appropriate
  • Standalone docs have been updated accordingly
  • Changelog(s) has/have been updated, as needed (see CHANGELOG.md, no need
    to update for typo fixes and such).

Hi, @igordejanovic ,

I've made the fix according to our today's discussion.

It may not be guaranteed that the node is always preserved during the whole visitor execution (e.g. if the node is not the AST node, but the tuple containing it). This is the rationale for keeping the reference to the node object in cache.

Best,
Vladimir

@igordejanovic igordejanovic merged commit 8a3fb61 into igordejanovic:master Dec 28, 2021
@igordejanovic
Copy link
Owner

@vladaindjic Looks good. Thanks!

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