mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
@@ -191,7 +191,7 @@ pub const WalkerDepthFirst = struct {
|
|||||||
// WalkerChildren iterates over the root's children only.
|
// WalkerChildren iterates over the root's children only.
|
||||||
pub const WalkerChildren = struct {
|
pub const WalkerChildren = struct {
|
||||||
pub fn get_next(_: WalkerChildren, root: *parser.Node, cur: ?*parser.Node) !?*parser.Node {
|
pub fn get_next(_: WalkerChildren, root: *parser.Node, cur: ?*parser.Node) !?*parser.Node {
|
||||||
// On wlak start, we return the first root's child.
|
// On walk start, we return the first root's child.
|
||||||
if (cur == null) return try parser.nodeFirstChild(root);
|
if (cur == null) return try parser.nodeFirstChild(root);
|
||||||
|
|
||||||
// If cur is root, then return null.
|
// If cur is root, then return null.
|
||||||
|
|||||||
Reference in New Issue
Block a user