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()); }
string MakeString(IEnumerable <Token> tokens) { var sb = new IndentingStringBuilder(configuration); foreach (var token in tokens) { MakeTokenString(token, sb); } sb.TrimLast(); return(sb.ToString()); }
string MakeString(IEnumerable <Token> tokens) { var sb = new IndentingStringBuilder(configuration.IndentIncrement, configuration.NewLineDefinition); 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"); } sb.TrimLast(); return(sb.ToString()); }
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()); }
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(); }
string MakeString(IEnumerable<Token> tokens) { var sb = new IndentingStringBuilder(configuration); foreach (var token in tokens) { MakeTokenString(token, sb); } sb.TrimLast(); return sb.ToString(); }
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(); }