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

Fix the tracking of variable nodes for scopes #1681

Merged
merged 5 commits into from Apr 26, 2022
Merged

Conversation

stof
Copy link
Contributor

@stof stof commented Apr 23, 2022

No description provided.

@nex3 nex3 self-requested a review April 25, 2022 20:45
@nex3
Copy link
Contributor

nex3 commented Apr 26, 2022

Can you give some more context here? Is this causing behavioral problems? Should it have a spec added for it?

@stof
Copy link
Contributor Author

stof commented Apr 26, 2022

The only effect I could think of is a bad sourcemap or a bad error location, as that's all nodes are used for.
I haven't tried to produce a broken behavior based on this. But the current code expects the lists of scopes in variables and variableNodes to be in sync, while variableNodes never leaves scopes. So it is likely to find a wrong span for reporting errors if a variable has the same name than a variable in a previous scope at the same depth.

@nex3 nex3 merged commit 7004d49 into sass:main Apr 26, 2022
@stof stof deleted the fix_scope_cleaning branch April 26, 2022 22:31
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.

None yet

2 participants