public static SeparatedSyntaxList <TNode> SeparatedList <TNode>(params CSharpSyntaxNode[] nodes) where TNode : CSharpSyntaxNode { if (nodes != null) { return(new SeparatedSyntaxList <TNode>(SyntaxList.List(nodes))); } return(default(SeparatedSyntaxList <TNode>)); }
internal GreenNode ToListNode() { switch (Count) { case 0: return(null); case 1: return(_nodes[0]); case 2: return(SyntaxList.List(_nodes[0], _nodes[1])); case 3: return(SyntaxList.List(_nodes[0], _nodes[1], _nodes[2])); default: var tmp = new ArrayElement <GreenNode> [Count]; Array.Copy(_nodes, tmp, Count); return(SyntaxList.List(tmp)); } }
public static SeparatedSyntaxList <TNode> SeparatedList <TNode>(TNode node1, SyntaxToken token, TNode node2) where TNode : CSharpSyntaxNode { return(new SeparatedSyntaxList <TNode>(new SyntaxList <CSharpSyntaxNode>(SyntaxList.List(node1, token, node2)))); }
internal static GreenNode ListNode(params ArrayElement <GreenNode>[] nodes) { return(SyntaxList.List(nodes)); }
internal static GreenNode ListNode(CSharpSyntaxNode node0, CSharpSyntaxNode node1, CSharpSyntaxNode node2) { return(SyntaxList.List(node0, node1, node2)); }
public static SyntaxList <TNode> List <TNode>(TNode node0, TNode node1, TNode node2) where TNode : CSharpSyntaxNode { return(new SyntaxList <TNode>(SyntaxList.List(node0, node1, node2))); }