fn renderVarDecl(
r: *Render,
var_decl: Ast.full.VarDecl,
/// Destructures intentionally ignore leading `comptime` tokens.
ignore_comptime_token: bool,
/// `comma_space` and `space` are used for destructure LHS decls.
space: Space,
) Error!void OutOfMemoryRan out of memory allocating call stack frames to complete rendering.
WriteFailedTransitive failure from
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228fn renderVarDecl(
r: *Render,
var_decl: Ast.full.VarDecl,
/// Destructures intentionally ignore leading `comptime` tokens.
ignore_comptime_token: bool,
/// `comma_space` and `space` are used for destructure LHS decls.
space: Space,
) Error!void {
try renderVarDeclWithoutFixups(r, var_decl, ignore_comptime_token, space);
if (r.fixups.unused_var_decls.contains(var_decl.ast.mut_token + 1)) {
// Discard the variable like this: `_ = foo;`
const ais = r.ais;
try ais.writeAll("_ = ");
try ais.writeAll(tokenSliceForRender(r.tree, var_decl.ast.mut_token + 1));
try ais.writeAll(";\n");
}
}