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