descriptionToFollow() public method

public descriptionToFollow ( bool follow ) : string
follow bool
return string
Ejemplo n.º 1
0
Archivo: IoMessage.cs Proyecto: ypyf/io
        public static IoObject slotCode(IoObject target, IoObject locals, IoObject message)
        {
            IoMessage self = target as IoMessage;
            string    s    = "";

            s = self.descriptionToFollow(true);
            return(IoSeq.createObject(self.state, s));
        }
Ejemplo n.º 2
0
Archivo: IoMessage.cs Proyecto: ypyf/io
        public string descriptionToFollow(bool follow)
        {
            IoMessage m = this;
            string    s = "";

            do
            {
                s += m.messageName;

                if (m.args.Count > 0)
                {
                    s += "(";

                    for (int i = 0; i < m.args.Count; i++)
                    {
                        IoMessage arg = m.args[i] as IoMessage;
                        s += arg.descriptionToFollow(true);
                        if (i != m.args.Count - 1)
                        {
                            s += ", ";
                        }
                    }

                    s += ")";
                }

                if (!follow)
                {
                    return(s);
                }

                if (m.next != null && !m.messageName.value.Equals(";"))
                {
                    s += " ";
                }
                if (m.messageName.value.Equals(";"))
                {
                    s += "\n";
                }
            } while ((m = m.next) != null);

            return(s);
        }