mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[glsl-in] Support function declarations with void as arguments
This commit is contained in:
committed by
Dzmitry Malyshau
parent
115d170584
commit
63a8463edd
@@ -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);
|
||||
|
||||
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user