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

Remove AstNode::scope_id field #98

Open
overlookmotel opened this issue Aug 26, 2024 · 0 comments
Open

Remove AstNode::scope_id field #98

overlookmotel opened this issue Aug 26, 2024 · 0 comments

Comments

@overlookmotel
Copy link

overlookmotel commented Aug 26, 2024

This field is only used:

  1. Within SemanticBuilder - where builder.current_scope_id can be used instead.
  2. In linter - where could get the ScopeId by traversing up nodes via AstNodes::parent_ids until find a node with a scope (we can do that now as AST nodes contain scope_id fields, and it shouldn't cost much as you generally don't have to go up far to find a BlockStatement or Function).

I don't know if that'd be a perf gain or loss overall in the linter, but it'd be a gain for everything else which uses Semantic.

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

No branches or pull requests

1 participant