output: log unreachable in renderExpression rather than crashing

something in std/os/windows/kernel32.zig hits an unreachable in
renderExpression. will figure it out later. for now, prefer logging an
error and continue program execution.
0.10
alex 2 years ago
parent c6fe95a36b
commit 02fafb76a0

@ -643,19 +643,19 @@ fn renderExpression(gpa: Allocator, ais: *Ais, tree: Ast, node: Ast.Node.Index,
return renderToken(ais, tree, main_tokens[node], space); // name
},
.fn_decl => unreachable,
.container_field => unreachable,
.container_field_init => unreachable,
.container_field_align => unreachable,
.root => unreachable,
.global_var_decl => unreachable,
.local_var_decl => unreachable,
.simple_var_decl => unreachable,
.aligned_var_decl => unreachable,
.@"usingnamespace" => unreachable,
.test_decl => unreachable,
.asm_output => unreachable,
.asm_input => unreachable,
//.fn_decl => unreachable,
//.container_field => unreachable,
//.container_field_init => unreachable,
//.container_field_align => unreachable,
//.root => unreachable,
//.global_var_decl => unreachable,
//.local_var_decl => unreachable,
//.simple_var_decl => unreachable,
//.aligned_var_decl => unreachable,
//.@"usingnamespace" => unreachable,
//.test_decl => unreachable,
//.asm_output => unreachable,
//.asm_input => unreachable,
else => |tag| {
log.err("renderExpression for {} unimplemented\n", .{tag});

Loading…
Cancel
Save