//TODO 하위 노드는 비주얼 객체에서 처리하도록 수정 private void DrawNode(LSVisualCollection visual, int depth = 0) { foreach (var child in visual) { for (int i = 0; i < depth; i++) { Console.Write(" "); } blockCanvas.Children.Add(child); Console.WriteLine(child.Kind.ToString()); DrawNode(child.ChildNodes, depth + 1); } }
public static LSVisualCollection Analyze(SyntaxNode node) { var result = new LSVisualCollection(); foreach (var child in node.ChildNodes()) { var nodeType = Determine(child); if (nodeType != null) { result.Add(nodeType); } } return(result); }