std docs: print bool values

master
xackus 2020-10-18 21:35:41 +02:00 committed by Veikka Tuominen
parent 90f7034b69
commit 36d586336c
2 changed files with 6 additions and 0 deletions

View File

@ -550,6 +550,8 @@
console.trace("TODO non-null optional value printing");
return "TODO";
}
case typeKinds.Bool:
return token(value, tokenKinds.Null, wantHtml);
default:
console.trace("TODO implement getValueText for this type:", zigAnalysis.typeKinds[typeObj.kind]);
return "TODO";

View File

@ -701,6 +701,10 @@ static void anal_dump_value(AnalDumpCtx *ctx, AstNode *source_node, ZigType *ty,
}
return;
}
case ZigTypeIdBool: {
jw_string(&ctx->jw, value->data.x_bool ? "true" : "false");
return;
}
case ZigTypeIdInt: {
jw_bigint(&ctx->jw, &value->data.x_bigint);
return;