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

AST node metadata (referenced declarations) #3600

Closed
0xalpharush opened this issue Sep 9, 2023 · 0 comments · Fixed by #3829
Closed

AST node metadata (referenced declarations) #3600

0xalpharush opened this issue Sep 9, 2023 · 0 comments · Fixed by #3829

Comments

@0xalpharush
Copy link

0xalpharush commented Sep 9, 2023

Version Information

  • vyper Version (output of vyper --version): 0.3.7
  • OS: osx/linux/win
  • Python Version (output of python --version):

What's your issue about?

Vyper AST nodes should add additional metata data indicating which declaration a given use references. This is useful for name resolution and would make it easier to create something like a Vyper LSP. While Vyper prevents many instances of shadowing that would make name resolution ambiguous, this additional info would further disambiguate issues outlined like those in #3582 and #3581.

Further, all ids of contracts and other declaration AST nodes must be unique for the entire compilation unit i.e. all contract ids, function defs, struct defs, etc should be unique.

How can it be fixed?

Add reference declaration field to each use of identifiers (Name AST nodes).

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 a pull request may close this issue.

1 participant