Exemplo n.º 1
0
    string MakeString(IEnumerable<Token> tokens)
    {
      var sb = new IndentingStringBuilder(IndentIncrement);

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

      return sb.ToString();
    }
Exemplo n.º 2
0
        string MakeString(IEnumerable <Token> tokens)
        {
            var sb = new IndentingStringBuilder(IndentIncrement);

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

            return(sb.ToString());
        }
Exemplo n.º 3
0
        string MakeString(List <Token> tokens, Dictionary <Reference, string> referencePaths)
        {
            var sb = new IndentingStringBuilder(IndentIncrement);

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

            return(sb.ToString());
        }
Exemplo n.º 4
0
        string MakeString(List <Token> tokens, Dictionary <Reference, string> referencePaths)
        {
            var sb = new IndentingStringBuilder(configuration.IndentIncrement, configuration.NewLineDefinition);

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

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

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

            sb.TrimLast();

            return(sb.ToString());
        }
Exemplo n.º 6
0
    string MakeString(IEnumerable<Token> tokens)
    {
      var sb = new IndentingStringBuilder(IndentIncrement);

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

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

      return sb.ToString();
    }
Exemplo n.º 7
0
        string MakeString(IEnumerable <Token> tokens)
        {
            var sb = new IndentingStringBuilder(IndentIncrement);

            Token previous = null;
            var   endTags  = new Stack <string>();

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

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

            return(sb.ToString());
        }
Exemplo n.º 8
0
        string MakeString(List <Token> tokens)
        {
            var sb = new IndentingStringBuilder(configuration);

            Token previous = null;
            var   endTags  = new Stack <string>();
            int   pos      = 0;

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

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

            sb.TrimLast();
            return(sb.ToString());
        }
Exemplo n.º 9
0
    string MakeString(List<Token> tokens, Dictionary<Reference, string> referencePaths)
    {
      var sb = new IndentingStringBuilder(IndentIncrement);

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

      return sb.ToString();
    }
Exemplo n.º 10
0
        string MakeString(List<Token> tokens)
        {
            var sb = new IndentingStringBuilder(configuration);

            Token previous = null;
            var endTags = new Stack<string>();
            int pos = 0;
            for (int i = 0; i < tokens.Count; i++)
            {
                var token = tokens[i];
                int skip = MakeTokenString(tokens, pos++, sb, endTags, previous);
                previous = token;
                i += skip;
            }

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

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

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

            sb.TrimLast();

            return sb.ToString();
        }