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 › zon › parse › fromZoirNodeAlloc Public Function fromZoirNodeAlloc Doc Source Public Function std.zon.parse.fromZoirNodeAlloc
pub fn fromZoirNodeAlloc (
T : type ,
gpa : Allocator ,
ast : Ast ,
zoir : Zoir ,
node : Zoir .Node .Index ,
diag : ?*Diagnostics ,
options : Options ,
) error Params File zon/parse.zig: 372
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402 pub fn fromZoirNodeAlloc (
T : type ,
gpa : Allocator ,
ast : Ast ,
zoir : Zoir ,
node : Zoir .Node .Index ,
diag : ?*Diagnostics ,
options : Options ,
) error { OutOfMemory , ParseZon }!T {
comptime assert (canParseType (T ));
if (diag ) |s | {
s .assertEmpty ();
s .ast = ast ;
s .zoir = zoir ;
}
if (zoir .hasCompileErrors ()) {
return error .ParseZon ;
}
var parser : Parser = .{
.gpa = gpa ,
.ast = ast ,
.zoir = zoir ,
.options = options ,
.diag = diag ,
};
return parser .parseExpr (T , node );
}
Like
fromZoirAlloc, but the parse starts atnodeinstead of root.