mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
expect semicolons wherever required
This commit is contained in:
committed by
Teodor Tanasoaia
parent
e6bd2e9071
commit
231af68386
@@ -1661,14 +1661,17 @@ impl Parser {
|
||||
let span = span.until(&peeked_span);
|
||||
return Err(Error::InvalidBreakIf(span));
|
||||
}
|
||||
lexer.expect(Token::Separator(';'))?;
|
||||
ast::StatementKind::Break
|
||||
}
|
||||
"continue" => {
|
||||
let _ = lexer.next();
|
||||
lexer.expect(Token::Separator(';'))?;
|
||||
ast::StatementKind::Continue
|
||||
}
|
||||
"discard" => {
|
||||
let _ = lexer.next();
|
||||
lexer.expect(Token::Separator(';'))?;
|
||||
ast::StatementKind::Kill
|
||||
}
|
||||
// assignment or a function call
|
||||
@@ -1685,6 +1688,7 @@ impl Parser {
|
||||
}
|
||||
_ => {
|
||||
self.assignment_statement(lexer, ctx.reborrow(), block)?;
|
||||
lexer.expect(Token::Separator(';'))?;
|
||||
self.pop_rule_span(lexer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user