diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-06-24 14:52:12 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-06-24 15:01:14 +0200 |
| commit | cea8a2f5008bdda8bfd85af58537d148edde75ba (patch) | |
| tree | b37a5a6f78901337e6683378ad6becf5dffae6f7 /src/link/tapi/parse.zig | |
| parent | b55a3cefa49549e62dbd40f385cc0a5b4b6433b3 (diff) | |
| download | zig-cea8a2f5008bdda8bfd85af58537d148edde75ba.tar.gz zig-cea8a2f5008bdda8bfd85af58537d148edde75ba.zip | |
tapi: apply ast fixes
Diffstat (limited to 'src/link/tapi/parse.zig')
| -rw-r--r-- | src/link/tapi/parse.zig | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/link/tapi/parse.zig b/src/link/tapi/parse.zig index 811ac27c68..1e40ac63dc 100644 --- a/src/link/tapi/parse.zig +++ b/src/link/tapi/parse.zig @@ -82,6 +82,8 @@ pub const Node = struct { options: std.fmt.FormatOptions, writer: anytype, ) !void { + _ = fmt; + _ = options; if (self.directive) |id| { try std.fmt.format(writer, "{{ ", .{}); const directive = self.base.tree.tokens[id]; @@ -125,6 +127,8 @@ pub const Node = struct { options: std.fmt.FormatOptions, writer: anytype, ) !void { + _ = fmt; + _ = options; try std.fmt.format(writer, "{{ ", .{}); for (self.values.items) |entry| { const key = self.base.tree.tokens[entry.key]; @@ -159,6 +163,8 @@ pub const Node = struct { options: std.fmt.FormatOptions, writer: anytype, ) !void { + _ = fmt; + _ = options; try std.fmt.format(writer, "[ ", .{}); for (self.values.items) |node| { try std.fmt.format(writer, "{}, ", .{node}); @@ -174,7 +180,10 @@ pub const Node = struct { pub const base_tag: Node.Tag = .value; - pub fn deinit(self: *Value, allocator: *Allocator) void {} + pub fn deinit(self: *Value, allocator: *Allocator) void { + _ = self; + _ = allocator; + } pub fn format( self: *const Value, @@ -182,6 +191,8 @@ pub const Node = struct { options: std.fmt.FormatOptions, writer: anytype, ) !void { + _ = fmt; + _ = options; const start = self.base.tree.tokens[self.start.?]; const end = self.base.tree.tokens[self.end.?]; return std.fmt.format(writer, "{s}", .{ @@ -563,7 +574,6 @@ const Parser = struct { if (self.eatToken(.SingleQuote)) |_| { node.start = node.start.? + 1; while (true) { - const pos = self.token_it.pos; const tok = self.token_it.next(); switch (tok.id) { .SingleQuote => { @@ -579,7 +589,6 @@ const Parser = struct { if (self.eatToken(.DoubleQuote)) |_| { node.start = node.start.? + 1; while (true) { - const pos = self.token_it.pos; const tok = self.token_it.next(); switch (tok.id) { .DoubleQuote => { @@ -594,7 +603,6 @@ const Parser = struct { // TODO handle multiline strings in new block scope while (true) { - const pos = self.token_it.pos; const tok = self.token_it.next(); switch (tok.id) { .Literal => {}, |
