discardAllParams
Function parameters
Parameters
- r:*Render
- fn_proto_node:Ast.Node.Index
Type definitions in this namespace
Types
Functions in this namespace
Functions
Error sets in this namespace
Error Sets
Source
Implementation
fn discardAllParams(r: *Render, fn_proto_node: Ast.Node.Index) Error!void {
const tree = &r.tree;
const ais = r.ais;
var buf: [1]Ast.Node.Index = undefined;
const fn_proto = tree.fullFnProto(&buf, fn_proto_node).?;
var it = fn_proto.iterate(tree);
while (it.next()) |param| {
const name_ident = param.name_token.?;
assert(tree.tokenTag(name_ident) == .identifier);
try ais.writeAll("_ = ");
try ais.writeAll(tokenSliceForRender(r.tree, name_ident));
try ais.writeAll(";\n");
}
}