mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 22:09:49 +00:00
Manifest: fix not initializing token locations
This commit is contained in:
parent
47a413361d
commit
ce052d89a8
@ -7,13 +7,15 @@ pub const multihash_hex_digest_len = 2 * multihash_len;
|
|||||||
pub const MultiHashHexDigest = [multihash_hex_digest_len]u8;
|
pub const MultiHashHexDigest = [multihash_hex_digest_len]u8;
|
||||||
|
|
||||||
pub const Dependency = struct {
|
pub const Dependency = struct {
|
||||||
location: union(enum) {
|
location: Location,
|
||||||
url: []const u8,
|
|
||||||
path: []const u8,
|
|
||||||
},
|
|
||||||
location_tok: Ast.TokenIndex,
|
location_tok: Ast.TokenIndex,
|
||||||
hash: ?[]const u8,
|
hash: ?[]const u8,
|
||||||
hash_tok: Ast.TokenIndex,
|
hash_tok: Ast.TokenIndex,
|
||||||
|
|
||||||
|
pub const Location = union(enum) {
|
||||||
|
url: []const u8,
|
||||||
|
path: []const u8,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ErrorMessage = struct {
|
pub const ErrorMessage = struct {
|
||||||
@ -249,9 +251,9 @@ const Parse = struct {
|
|||||||
|
|
||||||
var dep: Dependency = .{
|
var dep: Dependency = .{
|
||||||
.location = undefined,
|
.location = undefined,
|
||||||
.location_tok = undefined,
|
.location_tok = 0,
|
||||||
.hash = null,
|
.hash = null,
|
||||||
.hash_tok = undefined,
|
.hash_tok = 0,
|
||||||
};
|
};
|
||||||
var has_location = false;
|
var has_location = false;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user