| ... | ... | @@ -7,13 +7,15 @@ pub const multihash_hex_digest_len = 2 * multihash_len; |
| 7 | 7 | pub const MultiHashHexDigest = [multihash_hex_digest_len]u8; |
| 8 | 8 | |
| 9 | 9 | pub const Dependency = struct { |
| 10 | | location: union(enum) { |
| 11 | | url: []const u8, |
| 12 | | path: []const u8, |
| 13 | | }, |
| 10 | location: Location, |
| 14 | 11 | location_tok: Ast.TokenIndex, |
| 15 | 12 | hash: ?[]const u8, |
| 16 | 13 | hash_tok: Ast.TokenIndex, |
| 14 | |
| 15 | pub const Location = union(enum) { |
| 16 | url: []const u8, |
| 17 | path: []const u8, |
| 18 | }; |
| 17 | 19 | }; |
| 18 | 20 | |
| 19 | 21 | pub const ErrorMessage = struct { |
| ... | ... | @@ -249,9 +251,9 @@ const Parse = struct { |
| 249 | 251 | |
| 250 | 252 | var dep: Dependency = .{ |
| 251 | 253 | .location = undefined, |
| 252 | | .location_tok = undefined, |
| 254 | .location_tok = 0, |
| 253 | 255 | .hash = null, |
| 254 | | .hash_tok = undefined, |
| 256 | .hash_tok = 0, |
| 255 | 257 | }; |
| 256 | 258 | var has_location = false; |
| 257 | 259 | |