From acab137c9927092a972554ef85ab1d1fa48f0660 Mon Sep 17 00:00:00 2001 From: S0urc3C0de Date: Wed, 27 Jan 2021 21:53:02 +0100 Subject: [PATCH] Update to latest zig. Fix change for changing zig.ast name attribute to be optional. --- src/analysis.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analysis.zig b/src/analysis.zig index 6370553..975b1f6 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -199,7 +199,7 @@ pub fn getDeclNameToken(tree: *ast.Tree, node: *ast.Node) ?ast.TokenIndex { }, .TestDecl => { const decl = node.castTag(.TestDecl).?; - return (decl.name.castTag(.StringLiteral) orelse return null).token; + return ((decl.name orelse return null).castTag(.StringLiteral) orelse return null).token; }, else => {}, }