[glsl-in] Support function declarations with void as arguments

This commit is contained in:
João Capucho authored and Dzmitry Malyshau committed 2021-09-21 15:07:14 -04:00
1 parent 115d170584
commit 63a8463edd
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -586,6 +586,10 @@ impl<'source> ParsingContext<'source> {
context: &mut Context,
body: &mut Block,
) -> Result<()> {
if self.bump_if(parser, TokenValue::Void).is_some() {
return Ok(());
}
loop {
if self.peek_type_name(parser) || self.peek_parameter_qualifier(parser) {
let qualifier = self.parse_parameter_qualifier(parser);
+1 -1
View File
@@ -104,7 +104,7 @@ fn version() {
parser
.parse(
&Options::from(ShaderStage::Vertex),
"#version 450 core\nvoid main() {}",
"#version 450 core\nvoid main(void) {}",
)
.unwrap();
assert_eq!(