static public void AddChildren(this AST_Tree self, IAST b) { if (b is AST_Tree c) { for (int i = 0; i < c.children.Count; ++i) { self.AddChild(c.children[i]); } } }
public void VisitChildren(AST_Tree ast) { if (ast == null) { return; } var children = ast.children; for (int i = 0; i < children.Count; ++i) { Visit(children[i]); } }
public static void Dump(AST_Tree ast) { new AST_Dumper().Visit(ast); Console.WriteLine("\n============="); }