Beispiel #1
0
        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);
        }
Beispiel #2
0
        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;

        }