aboutsummaryrefslogtreecommitdiff
path: root/src/Manifest.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-10-08 15:27:00 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-10-08 16:54:31 -0700
commitce052d89a85be02494b25ba734ff4483e846176c (patch)
tree91ab2e7c2d16307ac58fed13f807259445186098 /src/Manifest.zig
parent47a413361dd6702dd0412ed58003e9ca9d8ba928 (diff)
downloadzig-ce052d89a85be02494b25ba734ff4483e846176c.tar.gz
zig-ce052d89a85be02494b25ba734ff4483e846176c.zip
Manifest: fix not initializing token locations
Diffstat (limited to 'src/Manifest.zig')
-rw-r--r--src/Manifest.zig14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Manifest.zig b/src/Manifest.zig
index 17d5d93fb5..7fce7c8bcb 100644
--- a/src/Manifest.zig
+++ b/src/Manifest.zig
@@ -7,13 +7,15 @@ pub const multihash_hex_digest_len = 2 * multihash_len;
pub const MultiHashHexDigest = [multihash_hex_digest_len]u8;
pub const Dependency = struct {
- location: union(enum) {
- url: []const u8,
- path: []const u8,
- },
+ location: Location,
location_tok: Ast.TokenIndex,
hash: ?[]const u8,
hash_tok: Ast.TokenIndex,
+
+ pub const Location = union(enum) {
+ url: []const u8,
+ path: []const u8,
+ };
};
pub const ErrorMessage = struct {
@@ -249,9 +251,9 @@ const Parse = struct {
var dep: Dependency = .{
.location = undefined,
- .location_tok = undefined,
+ .location_tok = 0,
.hash = null,
- .hash_tok = undefined,
+ .hash_tok = 0,
};
var has_location = false;