-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only execute
#define
if current scope is accepting lines (#7798)
# Objective While working on #7784, I noticed that a `#define VAR` in a `.wgsl` file is always effective, even if it its scope is not accepting lines. Example: ```c #define A #ifndef A #define B #endif ``` Currently, `B` will be defined although it shouldn't. This PR fixes that. ## Solution Move the branch responsible for `#define` lines into the last else branch, which is only evaluated if the current scope is accepting lines.
- Loading branch information
1 parent
1bd7306
commit e4fd25a
Showing
1 changed file
with
48 additions
and
20 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