mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 10:03:58 +01:00
[glsl-in] Lower the for loop init expression
This commit is contained in:
1 parent
ec0d97d961
commit
5ec129bbf0
1 file changed
+2
-4
@@ -1763,14 +1763,12 @@ impl<'source, 'program> Parser<'source, 'program> {
|
||||
if self.peek_type_name() || self.peek_type_qualifier() {
|
||||
self.parse_declaration(ctx, body, false)?;
|
||||
} else {
|
||||
self.parse_expression(ctx, body)?;
|
||||
let expr = self.parse_expression(ctx, body)?;
|
||||
ctx.lower(self.program, expr, false, body)?;
|
||||
self.expect(TokenValue::Semicolon)?;
|
||||
}
|
||||
}
|
||||
|
||||
ctx.emit_flush(body);
|
||||
ctx.emit_start();
|
||||
|
||||
let (mut block, mut continuing) = (Block::new(), Block::new());
|
||||
|
||||
if self.bump_if(TokenValue::Semicolon).is_none() {
|
||||
|
||||
Reference in new issue
Block a user