mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 21:17:45 +00:00
Add while statement parsing.
This CL adds parsing for the WGSL `while` statement. Bug: tint:1425 Change-Id: Ibce5e28568935ca4f51b5ac33e7a60af7a916b4a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93540 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
d10f3f4437
commit
49d1a2d950
@@ -58,6 +58,26 @@ sem::ForLoopStatement {
|
||||
}
|
||||
```
|
||||
|
||||
## while
|
||||
|
||||
WGSL:
|
||||
```
|
||||
while (condition) {
|
||||
statement;
|
||||
}
|
||||
```
|
||||
|
||||
Semantic tree:
|
||||
```
|
||||
sem::WhileStatement {
|
||||
sem::Expression condition
|
||||
|
||||
sem::LoopBlockStatement {
|
||||
sem::Statement statement
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## loop
|
||||
|
||||
WGSL:
|
||||
|
||||
Reference in New Issue
Block a user