Zig 0.17.0-dev (Split by item)
This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig library itself.
Zig › docs/ › wasm/ › Walk.zig › builtin_call
builtin_call
Walk.builtin_call
fn builtin_call (
w : *Walk ,
scope : *Scope ,
parent_decl : Decl .Index ,
node : Ast .Node .Index ,
params : []const Ast .Node .Index ,
) Oom !void
File
Code
fn builtin_call (
w : *Walk ,
scope : *Scope ,
parent_decl : Decl .Index ,
node : Ast .Node .Index ,
params : []const Ast .Node .Index ,
) Oom !void {
const ast = w .file .get_ast ();
const builtin_token = ast .nodeMainToken (node );
const builtin_name = ast .tokenSlice (builtin_token );
if (std .mem .eql (u8 , builtin_name , "@This" )) {
try w .file .get ().node_decls .put (gpa , node , scope .getNamespaceDecl ());
}
for (params ) |param | {
try expr (w , scope , parent_decl , param );
}
}