fix: comptimeExpr working with generated data
This commit is contained in:
@@ -1158,7 +1158,10 @@ var zigAnalysis;
|
||||
default: throw "TODO";
|
||||
case typeKinds.ComptimeExpr:
|
||||
{
|
||||
return "[ComptimeExpr]";
|
||||
// trying to match the std lib types
|
||||
// the *[1]anyopaque behavior it's happening
|
||||
// because of the known issue with arrays and pointers
|
||||
return "anyopaque";
|
||||
}
|
||||
case typeKinds.Array:
|
||||
{
|
||||
@@ -1443,10 +1446,11 @@ var zigAnalysis;
|
||||
});
|
||||
payloadHtml += '<span class="tok-kw">' + escapeHtml(name) + '</span>';
|
||||
} else if ("comptimeExpr" in value) {
|
||||
let comptimeExpr = zigAnalysis.comptimeExprs[value.comptimeExpr].code;
|
||||
if (opts.wantHtml) {
|
||||
payloadHtml += '<span class="tok-kw">[ComptimeExpr]</span>';
|
||||
payloadHtml += '<span class="tok-kw">' + comptimeExpr + '</span>';
|
||||
} else {
|
||||
payloadHtml += "[ComptimeExpr]";
|
||||
payloadHtml += comptimeExpr;
|
||||
}
|
||||
} else if (opts.wantHtml) {
|
||||
payloadHtml += '<span class="tok-kw">anytype</span>';
|
||||
|
||||
Reference in New Issue
Block a user