Skip to content

Commit 5fa3f77

Browse files
committed
WIP some refactoring of geometry library
1 parent 1020c43 commit 5fa3f77

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Parakeet/CstNode.cs

+8
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,13 @@ public static StringBuilder ToXml(this CstNode node, StringBuilder sb = null, st
8989

9090
return sb;
9191
}
92+
93+
public static IEnumerable<CstNode> Descendants(this CstNode node)
94+
{
95+
yield return node;
96+
foreach (var c in node.Children)
97+
foreach (var d in c.Descendants())
98+
yield return d;
99+
}
92100
}
93101
}

0 commit comments

Comments
 (0)