Skip to content

Commit

Permalink
Merge pull request gruebite#6 from mattnite/update
Browse files Browse the repository at this point in the history
catch up to master
  • Loading branch information
gruebite committed Feb 20, 2021
2 parents 05b63f3 + e81678f commit 69b9cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ pub const ZValue = union(enum) {
pub fn format(self: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {
switch (self) {
.Null => try std.fmt.format(writer, ".Null", .{}),
.String => try std.fmt.format(writer, ".String({})", .{self.String}),
.String => try std.fmt.format(writer, ".String({s})", .{self.String}),
.Int => try std.fmt.format(writer, ".Int({})", .{self.Int}),
.Float => try std.fmt.format(writer, ".Float({})", .{self.Float}),
.Bool => try std.fmt.format(writer, ".Bool({})", .{self.Bool}),
Expand Down Expand Up @@ -804,7 +804,7 @@ pub const ZNode = struct {
}

/// Finds the nth child node with a specific tag.
pub fn findNthAny(self: *const Self, nth: usize, tag: @TagType(ZValue)) ?*ZNode {
pub fn findNthAny(self: *const Self, nth: usize, tag: std.meta.Tag(ZValue)) ?*ZNode {
var count: usize = 0;
var iter: ?*ZNode = self.child;
while (iter) |n| {
Expand Down Expand Up @@ -836,7 +836,7 @@ pub const ZNode = struct {
}

/// Traverses descendants until a node with the tag is found.
pub fn findNthAnyDescendant(self: *const Self, nth: usize, value: @TagType(ZValue)) ?*ZNode {
pub fn findNthAnyDescendant(self: *const Self, nth: usize, value: std.meta.Tag(ZValue)) ?*ZNode {
var depth: isize = 0;
var count: usize = 0;
var iter: *const ZNode = self;
Expand Down

0 comments on commit 69b9cb9

Please sign in to comment.