Ejemplo n.º 1
0
 internal static string StringifyElement(HashSet <NeoValue> seen, NeoValue value)
 {
     if (value is NeoObject o)
     {
         if (seen.Contains(value))
         {
             return("<already-seen>");
         }
         else
         {
             seen.Add(value);
             return(o.Stringify(seen));
         }
     }
     else if (value is NeoArray a)
     {
         if (seen.Contains(value))
         {
             return("[already-seen]");
         }
         else
         {
             seen.Add(value);
             return(a.Stringify(seen));
         }
     }
     else
     {
         return(value.ToNeoString());
     }
 }
Ejemplo n.º 2
0
 public virtual NeoValue Concat(NeoValue other) => NeoString.ValueOf($"{ToNeoString()}{other.ToNeoString()}");