33 instantiations of SyntaxNodeOrTokenList
Microsoft.CodeAnalysis (8)
Syntax\SeparatedSyntaxList.cs (1)
54: this(new SyntaxNodeOrTokenList(node, index))
Syntax\SyntaxListBuilderExtensions.cs (1)
50return new SeparatedSyntaxList<TNode>(new SyntaxNodeOrTokenList(listNode.CreateRed(), 0));
Syntax\SyntaxNodeOrTokenList.cs (1)
328return new SyntaxNodeOrTokenList(newGreen.CreateRed(), 0);
Syntax\SyntaxNodeOrTokenListBuilder.cs (5)
133return new SyntaxNodeOrTokenList( 139return new SyntaxNodeOrTokenList(_nodes[0]!.CreateRed(), index: 0); 142return new SyntaxNodeOrTokenList( 146return new SyntaxNodeOrTokenList( 156return new SyntaxNodeOrTokenList(InternalSyntax.SyntaxList.List(tmp).CreateRed(), index: 0);
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Query.cs (1)
905return MakeQueryInvocation(node, receiver, methodName, new SeparatedSyntaxList<TypeSyntax>(new SyntaxNodeOrTokenList(typeArgSyntax, 0)), ImmutableArray.Create(typeArg), ImmutableArray<BoundExpression>.Empty, diagnostics
Syntax\SyntaxFactory.cs (3)
1344return new SeparatedSyntaxList<TNode>(new SyntaxNodeOrTokenList(node, index: 0)); 1520return new SyntaxNodeOrTokenList(nodesAndTokens); 1529return new SyntaxNodeOrTokenList(nodesAndTokens);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
CSharpUseDeconstructionCodeFixProvider.cs (1)
171SyntaxFactory.SeparatedList<ArgumentSyntax>(new SyntaxNodeOrTokenList(typeNode.Elements.GetWithSeparators().Select(ConvertTupleTypeElementComponent))),
Microsoft.CodeAnalysis.CSharp.Features (2)
ConvertAnonymousType\CSharpConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
67=> new(list.Select(CreateArgumentOrComma));
CSharpUseDeconstructionCodeFixProvider.cs (1)
171SyntaxFactory.SeparatedList<ArgumentSyntax>(new SyntaxNodeOrTokenList(typeNode.Elements.GetWithSeparators().Select(ConvertTupleTypeElementComponent))),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (13)
Syntax\SeparatedSyntaxListTests.cs (6)
28new SeparatedSyntaxList<CSharpSyntaxNode>(new SyntaxNodeOrTokenList(node1, 0)), 29new SeparatedSyntaxList<CSharpSyntaxNode>(new SyntaxNodeOrTokenList(node1, 0))); 32new SeparatedSyntaxList<CSharpSyntaxNode>(new SyntaxNodeOrTokenList(node1, 0)), 33new SeparatedSyntaxList<CSharpSyntaxNode>(new SyntaxNodeOrTokenList(node1, 1))); 36new SeparatedSyntaxList<CSharpSyntaxNode>(new SyntaxNodeOrTokenList(node1, 0)), 37new SeparatedSyntaxList<CSharpSyntaxNode>(new SyntaxNodeOrTokenList(node2, 0)));
Syntax\SyntaxNodeOrTokenListTests.cs (6)
25EqualityTesting.AssertEqual(new SyntaxNodeOrTokenList(node1, 0), new SyntaxNodeOrTokenList(node1, 0)); 26EqualityTesting.AssertEqual(new SyntaxNodeOrTokenList(node1, 0), new SyntaxNodeOrTokenList(node1, 1)); 27EqualityTesting.AssertNotEqual(new SyntaxNodeOrTokenList(node1, 0), new SyntaxNodeOrTokenList(node2, 0));
Syntax\SyntaxNodeTests.cs (1)
3296var list = new SyntaxNodeOrTokenList();
Microsoft.CodeAnalysis.Features (1)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
713=> new(list.Select(v => ConvertArgumentOrToken(generator, parameterNamingRule, isRecord, v)));
Microsoft.CodeAnalysis.VisualBasic (2)
Syntax\SyntaxNodeFactories.vb (2)
1019Return New SyntaxNodeOrTokenList(nodesAndTokens) 1027Return New SyntaxNodeOrTokenList(nodesAndTokens)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
ConvertAnonymousType\VisualBasicConvertAnonymousTypeToClassCodeRefactoringProvider.vb (1)
47Return New SyntaxNodeOrTokenList(list.Select(AddressOf CreateArgumentOrComma))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
TestSyntaxNodes.vb (1)
605CheckSingletonSeparatedList(New SeparatedSyntaxList(Of TypeSyntax)(New SyntaxNodeOrTokenList(CreateSimpleTypeName("goo"), 0)), 0)
110 references to SyntaxNodeOrTokenList
Microsoft.CodeAnalysis (47)
Syntax\CommonSyntaxNodeRemover.cs (1)
12SyntaxNodeOrTokenList nodesAndSeparators, int nodeIndex, int endOfLineKind,
Syntax\SeparatedSyntaxList.cs (7)
17private readonly SyntaxNodeOrTokenList _list; 21internal SeparatedSyntaxList(SyntaxNodeOrTokenList list) 37private static void Validate(SyntaxNodeOrTokenList list) 300public SyntaxNodeOrTokenList GetWithSeparators() 380var nodesWithSeps = this.GetWithSeparators(); 456var nodesWithSeps = this.GetWithSeparators(); 542var nodesWithSeps = this.GetWithSeparators();
Syntax\SeparatedSyntaxListBuilder.cs (2)
88SyntaxNodeOrTokenList list = nodes.GetWithSeparators(); 97SyntaxNodeOrTokenList list = nodes.GetWithSeparators();
Syntax\SyntaxListBuilder.cs (2)
113public void AddRange(SyntaxNodeOrTokenList list) 118public void AddRange(SyntaxNodeOrTokenList list, int offset, int count)
Syntax\SyntaxNodeOrTokenList.cs (31)
20public readonly struct SyntaxNodeOrTokenList : IEquatable<SyntaxNodeOrTokenList>, IReadOnlyCollection<SyntaxNodeOrToken> 33/// Initializes a new instance of the <see cref="SyntaxNodeOrTokenList"/> structure. 49/// Create a <see cref="SyntaxNodeOrTokenList"/> from a sequence of <see cref="SyntaxNodeOrToken"/>. 58/// Create a <see cref="SyntaxNodeOrTokenList"/> from one or more <see cref="SyntaxNodeOrToken"/>. 253/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified node or token added to the end. 256public SyntaxNodeOrTokenList Add(SyntaxNodeOrToken nodeOrToken) 262/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified nodes or tokens added to the end. 265public SyntaxNodeOrTokenList AddRange(IEnumerable<SyntaxNodeOrToken> nodesOrTokens) 271/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified node or token inserted at the index. 275public SyntaxNodeOrTokenList Insert(int index, SyntaxNodeOrToken nodeOrToken) 286/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified nodes or tokens inserted at the index. 290public SyntaxNodeOrTokenList InsertRange(int index, IEnumerable<SyntaxNodeOrToken> nodesAndTokens) 312private static SyntaxNodeOrTokenList CreateList(List<SyntaxNodeOrToken> items) 316return default(SyntaxNodeOrTokenList); 332/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the element at the specified index removed. 335public SyntaxNodeOrTokenList RemoveAt(int index) 348/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified element removed. 351public SyntaxNodeOrTokenList Remove(SyntaxNodeOrToken nodeOrTokenInList) 363/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified element replaced with a new node or token. 367public SyntaxNodeOrTokenList Replace(SyntaxNodeOrToken nodeOrTokenInList, SyntaxNodeOrToken newNodeOrToken) 378/// Creates a new <see cref="SyntaxNodeOrTokenList"/> with the specified element replaced with a new nodes and tokens. 382public SyntaxNodeOrTokenList ReplaceRange(SyntaxNodeOrToken nodeOrTokenInList, IEnumerable<SyntaxNodeOrToken> newNodesAndTokens) 446public static bool operator ==(SyntaxNodeOrTokenList left, SyntaxNodeOrTokenList right) 459public static bool operator !=(SyntaxNodeOrTokenList left, SyntaxNodeOrTokenList right) 472public bool Equals(SyntaxNodeOrTokenList other) 486return obj is SyntaxNodeOrTokenList && Equals((SyntaxNodeOrTokenList)obj); 506private readonly SyntaxNodeOrTokenList _list; 509internal Enumerator(in SyntaxNodeOrTokenList list)
Syntax\SyntaxNodeOrTokenListBuilder.cs (4)
87public void Add(SyntaxNodeOrTokenList list) 92public void Add(SyntaxNodeOrTokenList list, int offset, int length) 124public SyntaxNodeOrTokenList ToList() 161return default(SyntaxNodeOrTokenList);
Microsoft.CodeAnalysis.CSharp (13)
CSharpExtensions.cs (1)
352internal static SeparatedSyntaxList<TOther> AsSeparatedList<TOther>(this SyntaxNodeOrTokenList list) where TOther : SyntaxNode
Syntax\SyntaxFactory.cs (11)
1458/// Creates a separated list from a <see cref="SyntaxNodeOrTokenList"/>, where the list elements start with a node and then alternate between 1463public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(SyntaxNodeOrTokenList nodesAndTokens) where TNode : SyntaxNode 1478private static bool NodesAreCorrectType<TNode>(SyntaxNodeOrTokenList list) 1492private static bool HasSeparatedNodeTokenPattern(SyntaxNodeOrTokenList list) 1507/// Creates an empty <see cref="SyntaxNodeOrTokenList"/>. 1509public static SyntaxNodeOrTokenList NodeOrTokenList() 1511return default(SyntaxNodeOrTokenList); 1515/// Create a <see cref="SyntaxNodeOrTokenList"/> from a sequence of <see cref="SyntaxNodeOrToken"/>. 1518public static SyntaxNodeOrTokenList NodeOrTokenList(IEnumerable<SyntaxNodeOrToken> nodesAndTokens) 1524/// Create a <see cref="SyntaxNodeOrTokenList"/> from one or more <see cref="SyntaxNodeOrToken"/>. 1527public static SyntaxNodeOrTokenList NodeOrTokenList(params SyntaxNodeOrToken[] nodesAndTokens)
Syntax\SyntaxNodeRemover.cs (1)
209var withSeps = list.GetWithSeparators();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
CSharpTypeInferenceService.TypeInferrer.cs (1)
348var argsAndCommas = tupleExpression.Arguments.GetWithSeparators();
SeparatedSyntaxListExtensions.cs (1)
19var nodesAndTokens = newList.GetWithSeparators();
Microsoft.CodeAnalysis.CSharp.Features (9)
ConvertAnonymousType\CSharpConvertAnonymousTypeToClassCodeRefactoringProvider.cs (4)
48private static SyntaxNodeOrTokenList OmitTrailingComma(SyntaxNodeOrTokenList list) 66private SyntaxNodeOrTokenList CreateArguments(SyntaxNodeOrTokenList list)
SignatureHelp\SignatureHelpUtilities.cs (4)
28private static readonly Func<BaseArgumentListSyntax, SyntaxNodeOrTokenList> s_getBaseArgumentListArgumentsWithSeparators = 30private static readonly Func<TypeArgumentListSyntax, SyntaxNodeOrTokenList> s_getTypeArgumentListArgumentsWithSeparators = 32private static readonly Func<InitializerExpressionSyntax, SyntaxNodeOrTokenList> s_getInitializerExpressionArgumentsWithSeparators = 34private static readonly Func<AttributeArgumentListSyntax, SyntaxNodeOrTokenList> s_getAttributeArgumentListArgumentsWithSeparators =
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (1)
28private static readonly Func<TupleExpressionSyntax, SyntaxNodeOrTokenList> s_getArgumentsWithSeparators = e => e.Arguments.GetWithSeparators();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (10)
Syntax\SyntaxNodeOrTokenListTests.cs (8)
33Assert.Throws<NotSupportedException>(() => default(SyntaxNodeOrTokenList.Enumerator).GetHashCode()); 34Assert.Throws<NotSupportedException>(() => default(SyntaxNodeOrTokenList.Enumerator).Equals(default(SyntaxNodeOrTokenList.Enumerator))); 40var list = SyntaxFactory.NodeOrTokenList(SyntaxFactory.ParseToken("A "), SyntaxFactory.ParseToken("B "), SyntaxFactory.ParseToken("C ")); 59var newList = list.Add(tokenD); 175DoTestAddInsertRemoveReplaceOnEmptyList(default(SyntaxNodeOrTokenList)); 178private void DoTestAddInsertRemoveReplaceOnEmptyList(SyntaxNodeOrTokenList list) 185var newList = list.Add(tokenD);
Syntax\SyntaxNodeTests.cs (2)
671var nodesAndTokens = SyntaxFactory.NodeOrTokenList( 3296var list = new SyntaxNodeOrTokenList();
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
55internal override SeparatedSyntaxList<TElement> SeparatedList<TElement>(SyntaxNodeOrTokenList list)
CSharpTypeInferenceService.TypeInferrer.cs (1)
348var argsAndCommas = tupleExpression.Arguments.GetWithSeparators();
SeparatedSyntaxListExtensions.cs (1)
19var nodesAndTokens = newList.GetWithSeparators();
Microsoft.CodeAnalysis.Features (6)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
712private SyntaxNodeOrTokenList ConvertArguments(SyntaxGenerator generator, NamingRule parameterNamingRule, bool isRecord, SyntaxNodeOrTokenList list)
SignatureHelp\CommonSignatureHelpUtilities.cs (2)
28Func<TArgumentList, SyntaxNodeOrTokenList> getArgumentsWithSeparators, 52Func<TArgumentList, SyntaxNodeOrTokenList> getArgumentsWithSeparators,
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (2)
280var itemsAndSeparators = _listItems.GetWithSeparators(); 403var itemsAndSeparators = _listItems.GetWithSeparators();
Microsoft.CodeAnalysis.VisualBasic (12)
Syntax\SyntaxNodeFactories.vb (11)
969''' Creates a separated list from a <see cref="SyntaxNodeOrTokenList"/>. 970''' The <see cref="SyntaxNodeOrTokenList"/> must start with a node and alternate between nodes and separator tokens. 974Public Shared Function SeparatedList(Of TNode As SyntaxNode)(nodesAndTokens As SyntaxNodeOrTokenList) As SeparatedSyntaxList(Of TNode) 986Private Shared Function NodesAreCorrectType(Of TNode)(list As SyntaxNodeOrTokenList) As Boolean 997Private Shared Function HasSeparatedNodeTokenPattern(list As SyntaxNodeOrTokenList) As Boolean 1008''' Creates an empty <see cref="SyntaxNodeOrTokenList"/>. 1010Public Shared Function NodeOrTokenList() As SyntaxNodeOrTokenList 1015''' Creates a <see cref="SyntaxNodeOrTokenList"/> from a sequence of nodes and tokens. 1018Public Shared Function NodeOrTokenList(nodesAndTokens As IEnumerable(Of SyntaxNodeOrToken)) As SyntaxNodeOrTokenList 1023''' Creates a <see cref="SyntaxNodeOrTokenList"/> from one or more nodes and tokens. 1026Public Shared Function NodeOrTokenList(ParamArray nodesAndTokens As SyntaxNodeOrToken()) As SyntaxNodeOrTokenList
VisualBasicExtensions.vb (1)
453Friend Function AsSeparatedList(Of TOther As SyntaxNode)(list As SyntaxNodeOrTokenList) As SeparatedSyntaxList(Of TOther)
Microsoft.CodeAnalysis.VisualBasic.Features (5)
ConvertAnonymousType\VisualBasicConvertAnonymousTypeToClassCodeRefactoringProvider.vb (2)
46Private Function CreateArguments(list As SyntaxNodeOrTokenList) As SyntaxNodeOrTokenList
SignatureHelp\SignatureHelpUtilities.vb (3)
35Private ReadOnly s_getArgumentListArgumentsWithSeparators As Func(Of ArgumentListSyntax, SyntaxNodeOrTokenList) = Function(list) list.Arguments.GetWithSeparators() 36Private ReadOnly s_getTypeArgumentListArgumentsWithSeparators As Func(Of TypeArgumentListSyntax, SyntaxNodeOrTokenList) = Function(list) list.Arguments.GetWithSeparators() 37Private ReadOnly s_getCollectionInitializerArgumentsWithSeparators As Func(Of CollectionInitializerSyntax, SyntaxNodeOrTokenList) = Function(i) i.Initializers.GetWithSeparators()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
TestSyntaxNodes.vb (1)
263Private Sub VerifyListSpans(list As SyntaxNodeOrTokenList, expectedFullSpan As TextSpan)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
44Friend Overrides Function SeparatedList(Of TElement As SyntaxNode)(list As SyntaxNodeOrTokenList) As SeparatedSyntaxList(Of TElement)
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
1433internal abstract SeparatedSyntaxList<TElement> SeparatedList<TElement>(SyntaxNodeOrTokenList list) where TElement : SyntaxNode;