This repository has been archived by the owner on Jan 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously the wgsl frontend wasn't aware of lexical scopes causing all variables and named expressions to share a single function scope, this meant that if a variable was defined in a block with the same name as a variable in the function body, the variable in the function body would be lost and exiting the block all references to the variable in the function body would be replaced with the variable of the block. This commit fixes that by using the previously introduced `SymbolTable` to track the lexical and perform the variable lookups, scopes are pushed and popped as defined in the wgsl specification.
- Loading branch information
Showing
5 changed files
with
189 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.