Update to latest zig.

Fix change for changing zig.ast name attribute to be optional.
This commit is contained in:
S0urc3C0de 2021-01-27 21:53:02 +01:00
parent 6a66a7eb43
commit acab137c99

View File

@ -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 => {},
}