//check if type is a boolean or error type void BooleanCheck(AbstractNode node) { if ((node.TypeRef.GetType() != typeof(ASTBuilder.BooleanTypeDescriptor)) && !(node.TypeRef.GetType() != typeof(ASTBuilder.ErrorTypeDescriptor))) { Console.WriteLine("Require Boolean Type at " + node.ClassName()); } }
public virtual void VisitChildren(AbstractNode node) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("< In SemanticsVisitor.VistChildren for " + node.ClassName() + " >"); Console.ResetColor(); AbstractNode child = node.Child; while (child != null) { child.Accept(this); child = child.Sib; } ; }
public void Visit(AbstractNode node) { Console.WriteLine("<" + node.ClassName() + ">"); }