ToString() public method

public ToString ( ) : string
return string
        string MakeString(IEnumerable <Token> tokens)
        {
            var sb = new IndentingStringBuilder(configuration);

            foreach (var token in tokens)
            {
                MakeTokenString(token, sb);
            }

            sb.TrimLast();

            return(sb.ToString());
        }
Esempio n. 2
0
        string MakeString(List <Token> tokens, Dictionary <Reference, string> referencePaths)
        {
            var sb = new IndentingStringBuilder(configuration);

            for (int i = 0; i < tokens.Count; i++)
            {
                int skip = MakeStringFromToken(tokens, i, referencePaths, sb);
                i += skip;
            }

            sb.TrimLast();

            return(sb.ToString());
        }
Esempio n. 3
0
        string MakeString(IList <Token> tokens)
        {
            var sb = new IndentingStringBuilder(configuration);

            for (var i = 0; i < tokens.Count; i++)
            {
                var token = tokens[i];
                MakeTokenString(token, sb);
            }

            sb.TrimLast();
            var result = sb.ToString();

            // remove final superfluous trailing comma - very hacky, could probably be done better
            return(result.Remove(result.Length - 1));
        }
Esempio n. 4
0
        string MakeString(List<Token> tokens)
        {
            var sb = new IndentingStringBuilder(configuration);

            var endTags = new Stack<string>();
            int pos = 0;
            foreach (Token token in tokens)
            {
                MakeTokenString(token, sb, endTags);
            }

            if (endTags.Any())
                throw new Exception("Internal logic error");

            sb.TrimLast();
            return sb.ToString();
        }
Esempio n. 5
0
        string MakeString(List <Token> tokens)
        {
            var sb = new IndentingStringBuilder(configuration);

            var endTags = new Stack <string>();

            foreach (Token token in tokens)
            {
                MakeTokenString(token, sb, endTags);
            }

            if (endTags.Any())
            {
                throw new Exception("Internal logic error");
            }

            sb.TrimLast();
            return(sb.ToString());
        }
Esempio n. 6
0
        string MakeString(IEnumerable<Token> tokens)
        {
            var sb = new IndentingStringBuilder(configuration);

            foreach (var token in tokens)
            {
                MakeTokenString(token, sb);
            }

            sb.TrimLast();

            return sb.ToString();
        }
Esempio n. 7
0
        string MakeString(List<Token> tokens, Dictionary<Reference, string> referencePaths)
        {
            var sb = new IndentingStringBuilder(configuration);

            for (int i = 0; i < tokens.Count; i++)
            {
                int skip = MakeStringFromToken(tokens, i, referencePaths, sb);
                i += skip;
            }

            sb.TrimLast();

            return sb.ToString();
        }