mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
tint: Refactor if-else statement representation
Instead of using an `if` node that has a list of `else` statements, make each `if` statement have a single optional `else` statement, which may itself be an `if` statement (or just a block statement). This better matches the WGSL grammar (now that we have removed `elseif`), and simplifies various pieces of code that handle these statements. Change-Id: Ie4272f1422224490ac598a03aa8b4dd00ba03010 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87940 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
68e039c456
commit
26ebe5ec36
@@ -24,13 +24,11 @@ sem::IfStatement {
|
||||
sem::BlockStatement {
|
||||
statement_a
|
||||
}
|
||||
sem::ElseStatement {
|
||||
sem::IfStatement {
|
||||
condition_b
|
||||
sem::BlockStatement {
|
||||
statement_b
|
||||
}
|
||||
}
|
||||
sem::ElseStatement {
|
||||
sem::BlockStatement {
|
||||
statement_c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user