public static SyntaxTriviaList Create(IEnumerable <SyntaxTrivia> trivia) { if (trivia == null) { return(new SyntaxTriviaList()); } var builder = SyntaxTriviaListBuilder.Create(); builder.AddRange(trivia); return(builder.ToList()); }
/// <summary> /// Creates a list of trivia. /// </summary> /// <param name="trivias">A sequence of trivia.</param> public SyntaxTriviaList(IEnumerable <SyntaxTrivia> trivias) : this(null, SyntaxTriviaListBuilder.Create(trivias).Node, 0, 0) { }