generated docs: add optional type support

This commit is contained in:
Andrew Kelley
2019-10-10 20:32:17 -04:00
parent fa47172841
commit 6082c14753
3 changed files with 12 additions and 0 deletions

View File

@@ -991,6 +991,11 @@ static void anal_dump_type(AnalDumpCtx *ctx, ZigType *ty) {
}
break;
}
case ZigTypeIdOptional: {
jw_object_field(jw, "child");
anal_dump_type_ref(ctx, ty->data.maybe.child_type);
break;
}
case ZigTypeIdPointer: {
switch (ty->data.pointer.ptr_len) {
case PtrLenSingle: