Exemple #1
0
 public override bool Equals(object obj)
 {
     if (obj is MonadicFunction)
     {
         MonadicFunction other = (MonadicFunction)obj;
         return(this.token.Equals(other.token) && this.expression.Equals(other.expression));
     }
     return(false);
 }
Exemple #2
0
        private static string ToDot(string parent, MonadicFunction node)
        {
            string name     = String.Format("Monadic{0}", counter++);
            string exprName = ToDot(name, node.Expression);

            text.AppendFormat("  {0} [label=\"{1} ({2})\"];\n", name, node.Token.Text, node.Token.Type);
            text.AppendFormat("  {0} -> {1};\n", name, exprName);

            return(name);
        }
        private static string ToDot(string parent, MonadicFunction node)
        {
            string name = String.Format("Monadic{0}", counter++);
            string exprName = ToDot(name, node.Expression);

            text.AppendFormat("  {0} [label=\"{1} ({2})\"];\n", name, node.Token.Text, node.Token.Type);
            text.AppendFormat("  {0} -> {1};\n", name, exprName);

            return name;
        }