mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 16:24:51 +00:00
autodoc: fix frontend crash while rendering std.mem
Previously we expected to only find decl refs in a `foo.bar.baz` type of expression. This would crash when trying to render something like `@typeInfo(T).Int.bits`. We now properly account for builtins and other components.
This commit is contained in:
parent
14f0b70570
commit
622714b76b
@ -931,8 +931,7 @@ var zigAnalysis;
|
||||
return exprName(switchIndex, opts);
|
||||
}
|
||||
case "refPath" : {
|
||||
const declRef = expr.refPath[0].declRef;
|
||||
let name = zigAnalysis.decls[declRef].name;
|
||||
let name = exprName(expr.refPath[0]);
|
||||
for (let i = 1; i < expr.refPath.length; i++) {
|
||||
let component = undefined;
|
||||
if ("string" in expr.refPath[i]) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user