WellFormedNames.SimpleName.ToStringHelper C# (CSharp) Method

ToStringHelper() private method

private ToStringHelper ( StringBuilder sb, Literal previous, Literal current ) : void
sb StringBuilder
previous Literal
current Literal
return void
        private void ToStringHelper(StringBuilder sb, Literal previous, Literal current)
        {
            if (previous.type == LiteralType.Root)
            {
                sb.Append("(" + current.description);
            }
            if (previous.type == LiteralType.Param && current.type == LiteralType.Param)
            {
                sb.Append(')', previous.depth - current.depth);
                sb.Append("," + current.description);
            }
            if (previous.type == LiteralType.Param && current.type == LiteralType.Root)
            {
                sb.Append(')', previous.depth - current.depth);
                sb.Append("," + current.description);
            }
        }