authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-08 15:27:00-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-08 16:54:31-07:00
logce052d89a85be02494b25ba734ff4483e846176c
tree91ab2e7c2d16307ac58fed13f807259445186098
parent47a413361dd6702dd0412ed58003e9ca9d8ba928

Manifest: fix not initializing token locations


1 files changed, 8 insertions(+), 6 deletions(-)

src/Manifest.zig+8-6
......@@ -7,13 +7,15 @@ pub const multihash_hex_digest_len = 2 * multihash_len;
77pub const MultiHashHexDigest = [multihash_hex_digest_len]u8;
88
99pub const Dependency = struct {
10 location: union(enum) {
11 url: []const u8,
12 path: []const u8,
13 },
10 location: Location,
1411 location_tok: Ast.TokenIndex,
1512 hash: ?[]const u8,
1613 hash_tok: Ast.TokenIndex,
14
15 pub const Location = union(enum) {
16 url: []const u8,
17 path: []const u8,
18 };
1719};
1820
1921pub const ErrorMessage = struct {
......@@ -249,9 +251,9 @@ const Parse = struct {
249251
250252 var dep: Dependency = .{
251253 .location = undefined,
252 .location_tok = undefined,
254 .location_tok = 0,
253255 .hash = null,
254 .hash_tok = undefined,
256 .hash_tok = 0,
255257 };
256258 var has_location = false;
257259