mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 15:00:57 +01:00
Statement for void function call
This commit is contained in:
1 parent
f9f41fc9bf
commit
d949d58f7b
12 files changed
+668
-621
No files matched your search
@@ -203,6 +203,15 @@ where
|
||||
self.visitor.visit_lhs_expr(&self.expressions[left]);
|
||||
self.traverse_expr(value);
|
||||
}
|
||||
S::Call {
|
||||
function,
|
||||
ref arguments,
|
||||
} => {
|
||||
for &argument in arguments {
|
||||
self.traverse_expr(argument);
|
||||
}
|
||||
self.visitor.visit_fun(function);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ pub fn ensure_block_returns(block: &mut crate::Block) {
|
||||
| Some(&mut crate::Statement::Kill) => (),
|
||||
Some(&mut crate::Statement::Loop { .. })
|
||||
| Some(&mut crate::Statement::Store { .. })
|
||||
| Some(&mut crate::Statement::Call { .. })
|
||||
| None => block.push(crate::Statement::Return { value: None }),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user