Exemplo n.º 1
0
 public override bool Match(PythonNode root)
 {
     if (Type.Equals("any"))
     {
         return(true);
     }
     if (!root.GetType().Name.Equals(Type))
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
 public virtual bool Match(PythonNode root)
 {
     if (!root.GetType().Name.Equals(Type))
     {
         return(false);
     }
     if (Value == null && root.Value == null)
     {
         return(true);
     }
     if (Value == null && root.Value != null)
     {
         return(false);
     }
     if (Value != null && root.Value == null)
     {
         return(false);
     }
     return(Equals(Value, root.Value));
 }