From a3d808eb1b16aa2e089adcabbb2e2d8a44e9d93f Mon Sep 17 00:00:00 2001 From: mars Date: Thu, 5 May 2022 03:08:35 -0600 Subject: [PATCH] Better WGSL parsing errors --- src/shader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader.rs b/src/shader.rs index a39ac7f..7ef7ef1 100644 --- a/src/shader.rs +++ b/src/shader.rs @@ -147,7 +147,7 @@ impl ShaderLoader { match parser.parse(&source) { Ok(module) => Ok(module), // TODO handle parsing errors - Err(error) => panic!("wgsl parsing error:\n{}", error), + Err(error) => panic!("wgsl parsing error:\n{}", error.emit_to_string(&source)), } }