public override bool Equals(object obj) { if (obj is While) { While other = (While)obj; return((this.expression == other.expression) && (this.codeBlock == other.codeBlock)); } return(false); }
private static string ToDot(string parent, While node) { string name = String.Format("While{0}", counter++); string exprName = ToDot(name, node.Expression); string codeBlockName = ToDot(name, node.CodeBlock); text.AppendFormat(" {0} [label=\"While\"];\n", name); text.AppendFormat(" {0} -> {1};\n", name, exprName); text.AppendFormat(" {0} -> {1};\n", name, codeBlockName); return(name); }
private static string ToDot(string parent, While node) { string name = String.Format("While{0}", counter++); string exprName = ToDot(name, node.Expression); string codeBlockName = ToDot(name, node.CodeBlock); text.AppendFormat(" {0} [label=\"While\"];\n", name); text.AppendFormat(" {0} -> {1};\n", name, exprName); text.AppendFormat(" {0} -> {1};\n", name, codeBlockName); return name; }