mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
std lib docs: fix null and int values
This commit is contained in:
1 parent
ed23dad487
commit
bf46117f13
2 files changed
+24
No files matched your search
@@ -693,6 +693,18 @@ static void anal_dump_value(AnalDumpCtx *ctx, AstNode *source_node, ZigType *ty,
|
||||
}
|
||||
return;
|
||||
}
|
||||
case ZigTypeIdOptional: {
|
||||
if(optional_value_is_null(value)){
|
||||
jw_string(&ctx->jw, "null");
|
||||
} else {
|
||||
jw_null(&ctx->jw);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case ZigTypeIdInt: {
|
||||
jw_bigint(&ctx->jw, &value->data.x_bigint);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
jw_null(&ctx->jw);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user