Ejemplo n.º 1
0
        public override string ToString()
        {
            if (IsSuccess)
            {
                return(string.Format("Successful parsing of {0}.", Value));
            }

            var expMsg = "";

            if (Expected.Any())
            {
                expMsg = " expected " + Expected.Aggregate((e1, e2) => e1 + " or " + e2);
            }

            return(string.Format("Parsing failure: {0};{1} ({2});", Description, expMsg, Rest));
        }