90 references to Kind
Microsoft.CodeAnalysis.CSharp (10)
Binder\SwitchBinder.cs (1)
100SyntaxKind labelKind = label.IdentifierNodeOrToken.Kind();
Parser\Blender.Cursor.cs (5)
48this.CurrentNodeOrToken.Kind() == SyntaxKind.None || 49this.CurrentNodeOrToken.Kind() == SyntaxKind.EndOfFileToken; 55return token.Kind() == SyntaxKind.EndOfFileToken || token.FullWidth != 0; 182for (var node = cursor.CurrentNodeOrToken; node.Kind() != SyntaxKind.None && !SyntaxFacts.IsAnyToken(node.Kind()); node = cursor.CurrentNodeOrToken)
Parser\Blender.Reader.cs (1)
248if (IsFabricatedToken(nodeOrToken.Kind()))
Symbols\Source\SourceLabelSymbol.cs (1)
155&& symbol._identifierNodeOrToken.Kind() != SyntaxKind.None
Syntax\CSharpSyntaxNode.cs (1)
550var kind = nodeOrToken.Kind().ToString();
Syntax\SyntaxNodeRemover.cs (1)
279if (alternate != null && visited.Kind() != SyntaxKind.None)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
162if (argument.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.OpenBracketToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
35else if (members.LastOrDefault().Kind() == SyntaxKind.CommaToken)
Microsoft.CodeAnalysis.CSharp.Features (6)
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
68var openBrace = parent.ChildNodesAndTokens().FirstOrDefault(n => n.Kind() == SyntaxKind.OpenBraceToken).AsToken();
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
162if (argument.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.OpenBracketToken)
Structure\CSharpStructureHelpers.cs (1)
377if (child.Kind() != SyntaxKind.AttributeList)
Structure\Providers\EventDeclarationStructureProvider.cs (1)
39&& (!nextSibling.IsNode || nextSibling.Kind() is SyntaxKind.EventDeclaration or SyntaxKind.EventFieldDeclaration);
Structure\Providers\IndexerDeclarationStructureProvider.cs (1)
39&& (!nextSibling.IsNode || nextSibling.Kind() is SyntaxKind.IndexerDeclaration or SyntaxKind.PropertyDeclaration);
Structure\Providers\PropertyDeclarationStructureProvider.cs (1)
38&& (!nextSibling.IsNode || nextSibling.Kind() is SyntaxKind.PropertyDeclaration or SyntaxKind.IndexerDeclaration);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (71)
IncrementalParsing\GrammarAmbiguities.cs (2)
111Assert.Equal(expectedNode.Kind(), actualNode.Kind());
IncrementalParsing\IncrementalParsingTests.cs (4)
1669Assert.Equal(parsedTree.GetCompilationUnitRoot().ChildNodesAndTokens()[i].Kind(), incrementalTree.GetCompilationUnitRoot().ChildNodesAndTokens()[i].Kind()); 3742Assert.Equal(parsedTreeNode.Kind(), incrementalTreeNode.Kind());
LexicalAndXml\XmlDocCommentTests.cs (5)
1290Assert.Equal(SyntaxKind.ClassDeclaration, tree.GetCompilationUnitRoot().ChildNodesAndTokens()[0].Kind()); 1298Assert.Equal(SyntaxKind.EndOfFileToken, tree.GetCompilationUnitRoot().ChildNodesAndTokens()[1].Kind()); 1653Assert.Equal(SyntaxKind.XmlTextLiteralNewLineToken, xmltext.ChildNodesAndTokens()[0].Kind()); 1656Assert.Equal(SyntaxKind.XmlTextLiteralToken, xmltext.ChildNodesAndTokens()[1].Kind()); 1659Assert.Equal(SyntaxKind.XmlTextLiteralNewLineToken, xmltext.ChildNodesAndTokens()[2].Kind());
Parsing\ParsingErrorRecoveryTests.cs (3)
7280Assert.Equal(SyntaxKind.ClassDeclaration, classDecl.Kind()); 7283Assert.Equal(SyntaxKind.ConstructorDeclaration, methodDecl.Kind()); //not MethodDeclaration 7287Assert.Equal(SyntaxKind.Block, methodBody.Kind());
Parsing\ParsingTests.cs (6)
206Assert.Equal(kind, current.Kind()); 233Assert.Equal(kind, current.Kind()); 251var tk = _treeEnumerator.Current.Kind(); 298switch (node.Kind()) 313_output.WriteLine(@"N(SyntaxKind.{0}, ""{1}"");", node.Kind(), value); 316_output.WriteLine("{0}(SyntaxKind.{1});", node.IsMissing ? "M" : "N", node.Kind());
Syntax\SyntaxNodeTests.cs (51)
237Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[0].Kind()); 238Assert.Equal(SyntaxKind.TrueLiteralExpression, nodesAndTokens[1].Kind()); 239Assert.Equal(SyntaxKind.TrueKeyword, nodesAndTokens[2].Kind()); 240Assert.Equal(SyntaxKind.SemicolonToken, nodesAndTokens[3].Kind()); 244Assert.Equal(SyntaxKind.IfDirectiveTrivia, nodesAndTokens[0].Kind()); 245Assert.Equal(SyntaxKind.HashToken, nodesAndTokens[1].Kind()); 246Assert.Equal(SyntaxKind.IfKeyword, nodesAndTokens[2].Kind()); 247Assert.Equal(SyntaxKind.TrueLiteralExpression, nodesAndTokens[3].Kind()); 248Assert.Equal(SyntaxKind.TrueKeyword, nodesAndTokens[4].Kind()); 249Assert.Equal(SyntaxKind.EndOfDirectiveToken, nodesAndTokens[5].Kind()); 250Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[6].Kind()); 251Assert.Equal(SyntaxKind.TrueLiteralExpression, nodesAndTokens[7].Kind()); 252Assert.Equal(SyntaxKind.TrueKeyword, nodesAndTokens[8].Kind()); 253Assert.Equal(SyntaxKind.SemicolonToken, nodesAndTokens[9].Kind()); 258Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[0].Kind()); 259Assert.Equal(SyntaxKind.TrueLiteralExpression, nodesAndTokens[1].Kind()); 260Assert.Equal(SyntaxKind.TrueKeyword, nodesAndTokens[2].Kind()); 261Assert.Equal(SyntaxKind.SemicolonToken, nodesAndTokens[3].Kind()); 272Assert.Equal(SyntaxKind.ReturnStatement, nodesAndTokens[0].Kind()); 273Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[1].Kind()); 274Assert.Equal(SyntaxKind.TrueLiteralExpression, nodesAndTokens[2].Kind()); 275Assert.Equal(SyntaxKind.TrueKeyword, nodesAndTokens[3].Kind()); 276Assert.Equal(SyntaxKind.SemicolonToken, nodesAndTokens[4].Kind()); 280Assert.Equal(SyntaxKind.ReturnStatement, nodesAndTokens[0].Kind()); 281Assert.Equal(SyntaxKind.IfDirectiveTrivia, nodesAndTokens[1].Kind()); 282Assert.Equal(SyntaxKind.HashToken, nodesAndTokens[2].Kind()); 283Assert.Equal(SyntaxKind.IfKeyword, nodesAndTokens[3].Kind()); 284Assert.Equal(SyntaxKind.TrueLiteralExpression, nodesAndTokens[4].Kind()); 285Assert.Equal(SyntaxKind.TrueKeyword, nodesAndTokens[5].Kind()); 286Assert.Equal(SyntaxKind.EndOfDirectiveToken, nodesAndTokens[6].Kind()); 287Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[7].Kind()); 288Assert.Equal(SyntaxKind.TrueLiteralExpression, nodesAndTokens[8].Kind()); 289Assert.Equal(SyntaxKind.TrueKeyword, nodesAndTokens[9].Kind()); 290Assert.Equal(SyntaxKind.SemicolonToken, nodesAndTokens[10].Kind()); 295Assert.Equal(SyntaxKind.ReturnStatement, nodesAndTokens[0].Kind()); 296Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[1].Kind()); 297Assert.Equal(SyntaxKind.TrueLiteralExpression, nodesAndTokens[2].Kind()); 298Assert.Equal(SyntaxKind.TrueKeyword, nodesAndTokens[3].Kind()); 299Assert.Equal(SyntaxKind.SemicolonToken, nodesAndTokens[4].Kind()); 309Assert.Equal(SyntaxKind.CompilationUnit, nodesAndTokens[0].Kind()); 310Assert.Equal(SyntaxKind.EndOfFileToken, nodesAndTokens[1].Kind()); 321Assert.Equal(SyntaxKind.IdentifierName, nodesAndTokens[0].Kind()); 322Assert.Equal(SyntaxKind.SingleLineDocumentationCommentTrivia, nodesAndTokens[1].Kind()); 323Assert.Equal(SyntaxKind.XmlText, nodesAndTokens[2].Kind()); 324Assert.Equal(SyntaxKind.XmlTextLiteralToken, nodesAndTokens[3].Kind()); 325Assert.Equal(SyntaxKind.XmlTextLiteralNewLineToken, nodesAndTokens[4].Kind()); 326Assert.Equal(SyntaxKind.EndOfDocumentationCommentToken, nodesAndTokens[5].Kind()); 327Assert.Equal(SyntaxKind.IdentifierToken, nodesAndTokens[6].Kind()); 1279for (var child = children[0]; child.Kind() != SyntaxKind.None; child = child.GetNextSibling()) 1298for (var child = children[children.Count - 1]; child.Kind() != SyntaxKind.None; child = child.GetPreviousSibling()) 2002Assert.Equal(SyntaxKind.MethodDeclaration, tree.GetCompilationUnitRoot().ChildNodesAndTokens()[0].ChildNodesAndTokens()[3].Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
35else if (members.LastOrDefault().Kind() == SyntaxKind.CommaToken)