[glsl-in] Lower the for loop init expression

This commit is contained in:
João Capucho authored and Dzmitry Malyshau committed 2021-08-04 12:39:36 -04:00
1 parent ec0d97d961
commit 5ec129bbf0
1 file changed
+2 -4
+2 -4
View File
@@ -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() {