fix: slice_start, slice_end and slice_sentinel typeRef are now showing the slice type
This commit is contained in:
parent
1f5df0e034
commit
dd9a018185
|
@ -1092,7 +1092,6 @@ var zigAnalysis;
|
|||
let payloadHtml = "";
|
||||
const lhsExpr = zigAnalysis.exprs[expr.slice.lhs];
|
||||
const startExpr = zigAnalysis.exprs[expr.slice.start];
|
||||
console.log(expr)
|
||||
let decl = exprName(lhsExpr);
|
||||
let start = exprName(startExpr);
|
||||
let end = "";
|
||||
|
@ -1119,8 +1118,6 @@ var zigAnalysis;
|
|||
for (let i = 0; i < expr.switchOp.cases.length; i++) {
|
||||
const caseIndex = expr.switchOp.cases[i];
|
||||
const item = zigAnalysis.exprs[caseIndex];
|
||||
console.log(caseIndex);
|
||||
console.log(item);
|
||||
if (item['enumLiteral']) {
|
||||
payloadHtml += " " + " ." + exprName(item, opts) + " => {} " + "</br>";
|
||||
continue;
|
||||
|
@ -1130,7 +1127,6 @@ var zigAnalysis;
|
|||
if (expr.switchOp.else_index !== 0) {
|
||||
const else_index = expr.switchOp.else_index;
|
||||
const item = zigAnalysis.exprs[else_index];
|
||||
console.log(item);
|
||||
payloadHtml += " " + "else" + " => {} " + "</br>";
|
||||
}
|
||||
payloadHtml += "}";
|
||||
|
|
|
@ -1151,7 +1151,7 @@ fn walkInstruction(
|
|||
self.exprs.items[slice_index] = .{ .slice = .{ .lhs = lhs_index, .start = start_index } };
|
||||
|
||||
return DocData.WalkResult{
|
||||
.typeRef = .{ .type = @enumToInt(Ref.type_type) },
|
||||
.typeRef = self.decls.items[lhs.expr.declRef].value.typeRef,
|
||||
.expr = .{ .sliceIndex = slice_index },
|
||||
};
|
||||
},
|
||||
|
@ -1190,7 +1190,7 @@ fn walkInstruction(
|
|||
self.exprs.items[slice_index] = .{ .slice = .{ .lhs = lhs_index, .start = start_index, .end = end_index } };
|
||||
|
||||
return DocData.WalkResult{
|
||||
.typeRef = .{ .type = @enumToInt(Ref.type_type) },
|
||||
.typeRef = self.decls.items[lhs.expr.declRef].value.typeRef,
|
||||
.expr = .{ .sliceIndex = slice_index },
|
||||
};
|
||||
},
|
||||
|
@ -1237,7 +1237,7 @@ fn walkInstruction(
|
|||
self.exprs.items[slice_index] = .{ .slice = .{ .lhs = lhs_index, .start = start_index, .end = end_index, .sentinel = sentinel_index } };
|
||||
|
||||
return DocData.WalkResult{
|
||||
.typeRef = .{ .type = @enumToInt(Ref.type_type) },
|
||||
.typeRef = self.decls.items[lhs.expr.declRef].value.typeRef,
|
||||
.expr = .{ .sliceIndex = slice_index },
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user