Example #1
0
 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]);
         }
     }
 }
Example #2
0
        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]);
            }
        }
Example #3
0
 public static void Dump(AST_Tree ast)
 {
     new AST_Dumper().Visit(ast);
     Console.WriteLine("\n=============");
 }