208 references to Kind
Microsoft.CodeAnalysis.VisualBasic (208)
Analysis\FlowAnalysis\AbstractFlowPass.vb (1)
1829
hasCaseElse = hasCaseElse OrElse caseBlock.Syntax.
Kind
= SyntaxKind.CaseElseBlock
Analysis\FlowAnalysis\ControlFlowPass.vb (1)
169
If syntax.
Kind
= SyntaxKind.GoToStatement Then
Analysis\FlowAnalysis\DataFlowPass.vb (1)
2029
If syntax IsNot Nothing AndAlso syntax.
Kind
= SyntaxKind.VariableDeclarator Then
Binding\AttributeSemanticModel.vb (1)
57
Select Case node.
Kind
Binding\Binder_Attributes.vb (1)
802
If node.Syntax.
Kind
= SyntaxKind.PredefinedCastExpression Then
Binding\Binder_Conversions.vb (3)
468
(TypeOf argument.Syntax.Parent Is AssignmentStatementSyntax AndAlso argument.Syntax.Parent.
Kind
<> SyntaxKind.SimpleAssignmentStatement),
1260
warnIfResultOfAsyncMethodIsDroppedDueToRelaxation:=Not isExplicit AndAlso tree.
Kind
<> SyntaxKind.ObjectCreationExpression)
1484
warnIfResultOfAsyncMethodIsDroppedDueToRelaxation:=Not isExplicit AndAlso tree.
Kind
<> SyntaxKind.ObjectCreationExpression,
Binding\Binder_Delegates.vb (3)
573
If addressOfOperandSyntax.
Kind
= SyntaxKind.AddressOfExpression Then
630
If addressOfOperandSyntax.
Kind
= SyntaxKind.AddressOfExpression Then
996
If addressOfOperandSyntax.
Kind
= SyntaxKind.AddressOfExpression Then
Binding\Binder_Expressions.vb (3)
3653
node.Parent.
Kind
<> SyntaxKind.NamedFieldInitializer Then
3698
parent.
Kind
= SyntaxKind.SimpleMemberAccessExpression AndAlso
3705
syntax.Parent.
Kind
= SyntaxKind.NameOfExpression AndAlso
Binding\Binder_Initializers.vb (3)
295
If equalsValueOrAsNewSyntax.
Kind
() = SyntaxKind.AsNewClause Then
317
If equalsValueOrAsNewSyntax.
Kind
= SyntaxKind.AsNewClause Then
401
If equalsValueOrAsNewSyntax.
Kind
= SyntaxKind.AsNewClause Then
Binding\Binder_Invocation.vb (4)
1316
Select Case result.
Kind
1487
If node.
Kind
= SyntaxKind.IdentifierName AndAlso
1489
node.Parent.
Kind
= SyntaxKind.NamedFieldInitializer AndAlso
3283
Select Case syntax.
Kind
Binding\Binder_Statements.vb (1)
628
If Not node.WasCompilerGenerated AndAlso node.Syntax.
Kind
= SyntaxKind.LabelStatement AndAlso
Binding\Binder_Utils.vb (1)
761
Select Case node.
Kind
Binding\BinderFactory.BinderFactoryVisitor.vb (1)
85
If _factory.InScript AndAlso node.Parent.
Kind
= SyntaxKind.CompilationUnit Then
Binding\BinderFactory.vb (2)
49
node.
Kind
= SyntaxKind.CompilationUnit Then
113
If node.
Kind
= SyntaxKind.DocumentationCommentTrivia Then
Binding\ExecutableCodeBinder.vb (1)
55
Select Case _syntaxRoot.
Kind
Binding\InitializerSemanticModel.vb (5)
42
Select Case node.
Kind
107
If initializer.
Kind
= SyntaxKind.EqualsValue Then
147
If initializer.
Kind
= SyntaxKind.EqualsValue Then
169
If rootSyntax.
Kind
= SyntaxKind.FieldDeclaration Then
189
ElseIf rootSyntax.
Kind
= SyntaxKind.PropertyStatement Then
Binding\MemberSemanticModel.vb (22)
1270
If current.
Kind
= SyntaxKind.DocumentationCommentTrivia Then
1291
If current.
Kind
= SyntaxKind.MultiLineFunctionLambdaExpression OrElse current.
Kind
= SyntaxKind.MultiLineSubLambdaExpression Then
1306
ElseIf current.
Kind
= SyntaxKind.MultiLineFunctionLambdaExpression OrElse current.
Kind
= SyntaxKind.MultiLineSubLambdaExpression Then
1312
ElseIf current.
Kind
= SyntaxKind.SingleLineSubLambdaExpression Then
1335
Debug.Assert(current.Parent.
Kind
= SyntaxKind.WithStatement)
1336
Debug.Assert(current.Parent.Parent.
Kind
= SyntaxKind.WithBlock)
1374
Select Case node.
Kind
1705
If (node.
Kind
= SyntaxKind.InferredFieldInitializer OrElse node.
Kind
= SyntaxKind.NamedFieldInitializer) AndAlso
1706
node.Parent IsNot Nothing AndAlso node.Parent.
Kind
= SyntaxKind.ObjectMemberInitializer AndAlso
1707
node.Parent.Parent IsNot Nothing AndAlso node.Parent.Parent.
Kind
= SyntaxKind.AnonymousObjectCreationExpression Then
1912
If syntax.
Kind
= SyntaxKind.CollectionInitializer AndAlso parent IsNot Nothing Then
1913
If parent.
Kind
= SyntaxKind.ObjectCollectionInitializer Then
1915
ElseIf parent.
Kind
= SyntaxKind.CollectionInitializer Then
1917
Return parent IsNot Nothing AndAlso parent.
Kind
= SyntaxKind.ObjectCollectionInitializer
1953
Debug.Assert(bindingRoot.
Kind
= SyntaxKind.FieldDeclaration OrElse
1954
bindingRoot.
Kind
= SyntaxKind.PropertyStatement OrElse
1955
bindingRoot.
Kind
= SyntaxKind.Parameter OrElse
1956
bindingRoot.
Kind
= SyntaxKind.EnumMemberDeclaration OrElse
1982
If node.
Kind
= SyntaxKind.DocumentationCommentTrivia Then
BoundTree\BoundAssignmentOperator.vb (1)
93
(Type.IsVoidType() AndAlso Syntax.
Kind
= SyntaxKind.MidAssignmentStatement) OrElse
BoundTree\BoundLambda.vb (1)
22
Dim kind As SyntaxKind = Me.Syntax.
Kind
BoundTree\UnboundLambda.vb (2)
30
Dim kind As SyntaxKind = Me.Syntax.
Kind
43
Dim kind As SyntaxKind = Me.Syntax.
Kind
CodeGen\EmitStatement.vb (1)
1029
Debug.Assert(caseBlock.Syntax.
Kind
= SyntaxKind.CaseElseBlock)
Compilation\DocumentationComments\DocumentationCommentWalker.vb (1)
137
Dim kind As SyntaxKind = node.
Kind
()
Compilation\SemanticModel.vb (5)
932
boundNodes.LowestBoundNodeOfSyntacticParent.Syntax.
Kind
= SyntaxKind.ObjectCreationExpression AndAlso
999
((parentSyntax.
Kind
= SyntaxKind.ObjectCreationExpression AndAlso (DirectCast(parentSyntax, ObjectCreationExpressionSyntax).Type Is boundNodes.LowestBoundNode.Syntax))) Then
1038
boundNodes.LowestBoundNodeOfSyntacticParent.Syntax.
Kind
= SyntaxKind.ObjectCreationExpression AndAlso
1146
If lowestExpr.Kind = BoundKind.BadExpression AndAlso lowestExpr.Syntax.
Kind
= SyntaxKind.ObjectCreationExpression Then
1430
parentSyntax.
Kind
= SyntaxKind.Attribute AndAlso
Compilation\VisualBasicCompilation.vb (1)
2322
Dim getKind As Func(Of SyntaxNode, SyntaxKind) = Function(node As SyntaxNode) node.
Kind
Declarations\MergedTypeDeclaration.vb (2)
86
Select Case node.
Kind
101
Throw ExceptionUtilities.UnexpectedValue(node.
Kind
)
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (1)
521
Select Case syntax.
Kind
()
Lowering\Instrumentation\DebugInfoInjector.vb (3)
200
Select Case original.Syntax.
Kind
225
Select Case original.Syntax.
Kind
246
Select Case original.AlternativeOpt.Syntax.
Kind
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.vb (1)
154
Debug.Assert(syntax.Parent.
Kind
= SyntaxKind.VariableDeclarator)
Lowering\Instrumentation\Instrumenter.vb (36)
133
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.SyncLockBlock)
139
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.SyncLockBlock)
148
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.SyncLockBlock)
157
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.SyncLockBlock)
166
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.WhileBlock)
172
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.WhileBlock)
187
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.ForEachBlock)
193
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.MultiLineIfBlock OrElse original.Syntax.
Kind
= SyntaxKind.ElseIfBlock OrElse original.Syntax.
Kind
= SyntaxKind.SingleLineIfStatement)
199
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.MultiLineIfBlock)
208
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.MultiLineIfBlock OrElse original.Syntax.
Kind
= SyntaxKind.ElseIfBlock OrElse original.Syntax.
Kind
= SyntaxKind.SingleLineIfStatement)
217
Debug.Assert(original.AlternativeOpt.Syntax.
Kind
= SyntaxKind.ElseBlock)
218
Debug.Assert(original.AlternativeOpt.Syntax.Parent.
Kind
= SyntaxKind.MultiLineIfBlock)
227
Debug.Assert(original.AlternativeOpt.Syntax.
Kind
= SyntaxKind.ElseBlock OrElse original.AlternativeOpt.Syntax.
Kind
= SyntaxKind.SingleLineElseClause)
263
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.CatchBlock)
276
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.CatchBlock)
286
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.TryBlock)
288
Debug.Assert(original.FinallyBlockOpt.Syntax.
Kind
= SyntaxKind.FinallyBlock)
297
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.TryBlock)
303
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.TryBlock)
336
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.SelectBlock)
350
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.ForEachBlock)
360
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.ForEachBlock)
366
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.ForBlock)
372
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.ForBlock)
378
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.ModifiedIdentifier)
379
Debug.Assert(original.Syntax.Parent.
Kind
= SyntaxKind.VariableDeclarator)
388
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.UsingBlock)
394
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.UsingBlock)
403
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.UsingBlock)
412
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.WithBlock)
421
Debug.Assert(original.Syntax.
Kind
= SyntaxKind.WithBlock)
Lowering\LambdaRewriter\LambdaFrame.vb (2)
114
Select Case syntaxOpt.
Kind
()
120
ExceptionUtilities.UnexpectedValue(syntaxOpt.
Kind
())
Lowering\LambdaRewriter\LambdaRewriter.vb (2)
1281
Select Case curSyntax.
Kind
1391
Select Case node.Syntax.
Kind
Lowering\LocalRewriter\LocalRewriter.vb (3)
301
node.Syntax.
Kind
<> SyntaxKind.GroupAggregation AndAlso
302
((node.Syntax.
Kind
= SyntaxKind.SimpleAsClause AndAlso node.Syntax.Parent.
Kind
= SyntaxKind.CollectionRangeVariable) OrElse
Lowering\LocalRewriter\LocalRewriter_AsNewLocalDeclarations.vb (1)
54
Debug.Assert(node.Syntax.
Kind
= SyntaxKind.VariableDeclarator)
Lowering\LocalRewriter\LocalRewriter_If.vb (8)
42
Select Case syntax.
Kind
55
Throw ExceptionUtilities.UnexpectedValue(syntax.
Kind
)
69
If syntax.
Kind
<> SyntaxKind.SingleLineIfStatement Then
146
Select Case instrumentationTargetOpt.Syntax.
Kind
154
Throw ExceptionUtilities.UnexpectedValue(instrumentationTargetOpt.Syntax.
Kind
)
157
If instrumentationTargetOpt.Syntax.
Kind
= SyntaxKind.MultiLineIfBlock Then
190
Select Case instrumentationTargetOpt.Syntax.
Kind
198
Throw ExceptionUtilities.UnexpectedValue(instrumentationTargetOpt.Syntax.
Kind
)
Lowering\LocalRewriter\LocalRewriter_Label.vb (1)
21
Not node.WasCompilerGenerated AndAlso node.Syntax.
Kind
= SyntaxKind.LabelStatement Then
Lowering\LocalRewriter\LocalRewriter_SelectCase.vb (4)
285
Debug.Assert(curCaseBlock.Syntax.
Kind
= SyntaxKind.CaseElseBlock)
298
Debug.Assert(curCaseBlock.Syntax.
Kind
= SyntaxKind.CaseBlock)
325
Debug.Assert(node.Syntax.
Kind
= SyntaxKind.CaseStatement)
333
Debug.Assert(node.Syntax.
Kind
= SyntaxKind.CaseElseStatement)
Lowering\LocalRewriter\LocalRewriter_SyncLock.vb (1)
182
If syntaxNode.Parent.
Kind
= SyntaxKind.SyncLockStatement Then
Lowering\LocalRewriter\LocalRewriter_Throw.vb (1)
23
Debug.Assert(node.Syntax.
Kind
= SyntaxKind.ErrorStatement, "Must be an Error statement.")
Lowering\LocalRewriter\LocalRewriter_UnstructuredExceptionHandling.vb (13)
480
If statement.Syntax.Parent IsNot Nothing AndAlso statement.Syntax.Parent.
Kind
= SyntaxKind.EraseStatement Then
483
Select Case statement.Syntax.
Kind
497
statement.Syntax.Parent.
Kind
<> SyntaxKind.VariableDeclarator OrElse
499
statement.Syntax.Parent.Parent.
Kind
<> SyntaxKind.LocalDeclarationStatement Then
524
Debug.Assert(statement.Syntax.
Kind
= SyntaxKind.ElseIfBlock AndAlso
526
statement.Syntax.Parent.
Kind
= SyntaxKind.MultiLineIfBlock AndAlso
530
Debug.Assert((statement.Syntax.
Kind
= SyntaxKind.CaseBlock OrElse statement.Syntax.
Kind
= SyntaxKind.CaseElseBlock) AndAlso
532
statement.Syntax.Parent.
Kind
= SyntaxKind.SelectBlock AndAlso
536
Debug.Assert(statement.Syntax.
Kind
= SyntaxKind.ModifiedIdentifier AndAlso
538
statement.Syntax.Parent.
Kind
= SyntaxKind.VariableDeclarator AndAlso
540
statement.Syntax.Parent.Parent.
Kind
= SyntaxKind.LocalDeclarationStatement)
543
Debug.Assert((statement.Syntax.
Kind
= SyntaxKind.RedimClause AndAlso
Lowering\LocalRewriter\LocalRewriter_With.vb (1)
68
Dim instrument As Boolean = Me.Instrument(node) AndAlso syntax.
Kind
= SyntaxKind.WithBlock
Lowering\StateMachineRewriter\StateMachineRewriter.StateMachineMethodToClassRewriter.vb (1)
180
SyntaxBindingUtilities.BindsToTryStatement(node), $"Unexpected syntax: {node.
Kind
()}")
Scanner\Blender.vb (2)
118
If node.
Kind
= SyntaxKind.CompilationUnit OrElse IsStatementLike(node) Then
132
Select Case node.
Kind
Semantics\OverloadResolution.vb (1)
3418
If parent.
Kind
= SyntaxKind.Attribute Then
src\Compilers\VisualBasic\BasicAnalyzerDriver\VisualBasicDeclarationComputer.vb (1)
56
Select Case node.
Kind
()
Syntax\InternalSyntax\SyntaxNode.vb (1)
237
If element.
Kind
= SyntaxKind.JoinCondition Then
Syntax\LambdaUtilities.vb (16)
17
Select Case node.
Kind
75
Select Case oldLambda.
Kind
94
Throw ExceptionUtilities.UnexpectedValue(oldLambda.
Kind
)
125
Select Case parent.
Kind
313
Select Case node.
Kind
362
Select Case lambda.
Kind
383
Select Case clause.
Kind
399
Throw ExceptionUtilities.UnexpectedValue(clause.
Kind
)
404
Select Case clause.
Kind
419
Throw ExceptionUtilities.UnexpectedValue(clause.
Kind
)
433
Throw ExceptionUtilities.UnexpectedValue(lambda.
Kind
)
489
Select Case node.
Kind
540
Select Case clause.
Kind
()
586
Select Case clause.
Kind
598
Throw ExceptionUtilities.UnexpectedValue(clause.
Kind
)
637
Select Case node.
Kind
()
Syntax\SyntaxFacts.vb (10)
167
Select Case parent.
Kind
()
242
Select Case possibleLambda.
Kind
()
298
Select Case possibleBlock.
Kind
338
Select Case possibleBlock.
Kind
()
638
Select Case nextNode.
Kind
()
668
If node.
Kind
<> SyntaxKind.IdentifierName Then
806
Dim parentKind = token.Parent.
Kind
869
token.Parent.Parent.
Kind
= SyntaxKind.NamedFieldInitializer
1045
Dim parentKind = token.Parent.
Kind
1163
Select Case parent.
Kind
()
Syntax\SyntaxNodeExtensions.vb (3)
87
Select Case this.
Kind
323
Select Case syntax.
Kind
371
Throw ExceptionUtilities.UnexpectedValue(syntax.
Kind
)
Syntax\SyntaxNormalizer.vb (25)
212
Not (trivia.Kind = SyntaxKind.ColonTrivia AndAlso tokenParent IsNot Nothing AndAlso tokenParent.
Kind
= SyntaxKind.LabelStatement) AndAlso
213
Not (tokenParent IsNot Nothing AndAlso tokenParent.Parent IsNot Nothing AndAlso tokenParent.Parent.
Kind
= SyntaxKind.CrefReference) AndAlso
423
If nextToken.Parent.
Kind
= SyntaxKind.SingleLineFunctionLambdaExpression Then
462
If (token.Kind = SyntaxKind.CommaToken AndAlso (nextToken.Kind = SyntaxKind.EmptyToken OrElse token.Parent.
Kind
= SyntaxKind.InterpolationAlignmentClause)) OrElse
470
ElseIf nextToken.Kind = SyntaxKind.DotToken AndAlso nextToken.Parent.
Kind
<> SyntaxKind.NamedFieldInitializer Then
475
If token.Parent.
Kind
= SyntaxKind.LabelStatement Then
479
ElseIf nextToken.Parent.
Kind
= SyntaxKind.InterpolationFormatClause Then
498
If SyntaxFacts.IsRelationalCaseClause(token.Parent.
Kind
()) OrElse
499
SyntaxFacts.IsRelationalCaseClause(nextToken.Parent.
Kind
()) Then
506
token.Parent.
Kind
= SyntaxKind.AttributeList) Then
521
If token.Kind = SyntaxKind.ColonToken AndAlso token.Parent.
Kind
= SyntaxKind.XmlPrefix OrElse
522
nextToken.Kind = SyntaxKind.ColonToken AndAlso nextToken.Parent.
Kind
= SyntaxKind.XmlPrefix Then
549
If token.Kind = SyntaxKind.ColonToken AndAlso token.Parent.
Kind
= SyntaxKind.AttributeTarget OrElse
550
nextToken.Kind = SyntaxKind.ColonToken AndAlso nextToken.Parent.
Kind
= SyntaxKind.AttributeTarget Then
556
(token.Parent.
Kind
= SyntaxKind.XmlAttribute OrElse
557
token.Parent.
Kind
= SyntaxKind.XmlCrefAttribute OrElse
558
token.Parent.
Kind
= SyntaxKind.XmlNameAttribute OrElse
559
token.Parent.
Kind
= SyntaxKind.XmlDeclaration)) OrElse
561
(nextToken.Parent.
Kind
= SyntaxKind.XmlAttribute OrElse
562
nextToken.Parent.
Kind
= SyntaxKind.XmlCrefAttribute OrElse
563
nextToken.Parent.
Kind
= SyntaxKind.XmlNameAttribute OrElse
564
nextToken.Parent.
Kind
= SyntaxKind.XmlDeclaration)) Then
576
If token.Kind = SyntaxKind.AtToken AndAlso token.Parent.
Kind
= SyntaxKind.XmlAttributeAccessExpression Then
597
If token.Parent.
Kind
= SyntaxKind.RegionDirectiveTrivia AndAlso
690
If listElement.
Kind
= SyntaxKind.LabelStatement Then
Syntax\VisualBasicSyntaxRewriter.vb (1)
86
If alternate IsNot Nothing AndAlso visited IsNot Nothing AndAlso visited.
Kind
<> SyntaxKind.None Then
Syntax\VisualBasicSyntaxTree.vb (1)
387
If Not SyntaxFacts.IsXmlSyntax(node.
Kind
()) Then