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 standard library.
std › zig › Ast › globalVarDecl Public Function globalVarDecl Doc Source Public Function std.zig.Ast.globalVarDecl
pub fn globalVarDecl (tree : Ast , node : Node .Index ) full .VarDecl Params File zig/Ast.zig: 1312
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324 pub fn globalVarDecl (tree : Ast , node : Node .Index ) full .VarDecl {
assert (tree .nodeTag (node ) == .global_var_decl );
const extra_index , const init_node = tree .nodeData (node ).extra_and_opt_node ;
const extra = tree .extraData (extra_index , Node .GlobalVarDecl );
return tree .fullVarDeclComponents (.{
.type_node = extra .type_node ,
.align_node = extra .align_node ,
.addrspace_node = extra .addrspace_node ,
.section_node = extra .section_node ,
.init_node = init_node ,
.mut_token = tree .nodeMainToken (node ),
});
}