diff options
| author | Veikka Tuominen <git@vexu.eu> | 2020-06-01 14:50:05 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-01 14:50:05 +0300 |
| commit | eb687810cfdb057b661148a759280d83e6135393 (patch) | |
| tree | c30433c82e711a95a720aa25f66d0e2b1be28980 /src/dump_analysis.cpp | |
| parent | 8c5c860b00d214baa5fec3830e94761aa757b0d4 (diff) | |
| parent | 721c76b53c706020ceb50466e5a6245739efce05 (diff) | |
| download | zig-eb687810cfdb057b661148a759280d83e6135393.tar.gz zig-eb687810cfdb057b661148a759280d83e6135393.zip | |
Merge pull request #4976 from xackus/std-lib-docs
std lib docs: fix null and int values
Diffstat (limited to 'src/dump_analysis.cpp')
| -rw-r--r-- | src/dump_analysis.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dump_analysis.cpp b/src/dump_analysis.cpp index fe0052509f..2f41341b14 100644 --- a/src/dump_analysis.cpp +++ b/src/dump_analysis.cpp @@ -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; |
