We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddaa05e commit b97d061Copy full SHA for b97d061
1 file changed
src/Node.zig
@@ -48,19 +48,6 @@ pub fn getLastChild(self: *Node) !?*Node {
48
}
49
50
51
-pub fn childrenOfType(self: Node, allocator: Allocator, ty: Type) !ArrayList(Node) {
52
- switch (self.type) {
53
- inline .document, .element => {
54
- var result = try ArrayList(Node).initCapacity(allocator, self.children.items.len);
55
- for (self.children.items) |child| {
56
- if (child.type == ty) try result.append(allocator, child);
57
- }
58
- return result;
59
- },
60
- else => return error.InvalidOperation,
61
62
-}
63
-
64
pub fn lastChildOfType(self: *Node, ty: Type) !?*Node {
65
switch (self.type) {
66
inline .document, .element => {
0 commit comments