Merge pull request #4976 from xackus/std-lib-docs

std lib docs: fix null and int values
This commit is contained in:
Veikka Tuominen
2020-06-01 14:50:05 +03:00
committed by GitHub
2 changed files with 59 additions and 104 deletions

View File

@@ -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;