fix compile errors on stage1

This commit is contained in:
avokadoen
2022-09-01 14:01:34 +02:00
parent 445f3e6b7a
commit 8e45eff185
3 changed files with 7 additions and 6 deletions

View File

@@ -56,7 +56,8 @@ pub const Element = struct {
}
pub fn findChildByTag(self: Element, tag: []const u8) ?*Element {
return self.findChildrenByTag(tag).next();
var children = self.findChildrenByTag(tag);
return children.next();
}
pub fn findChildrenByTag(self: Element, tag: []const u8) FindChildrenByTagIterator {
@@ -435,7 +436,7 @@ fn parseElement(parser: *Parser, alloc: Allocator, comptime kind: ElementKind) !
return null;
};
break :blk tag;
}
},
};
var attributes = std.ArrayList(Attribute).init(alloc);
@@ -474,7 +475,7 @@ fn parseElement(parser: *Parser, alloc: Allocator, comptime kind: ElementKind) !
_ = parser.eatWs();
try parser.expect('>');
}
}
},
}
const element = try alloc.create(Element);