150 references to Label
Microsoft.CodeAnalysis.CSharp.Features (150)
EditAndContinue\SyntaxComparer.cs (150)
45
/// - If <see cref="TiedToAncestor(
Label
)"/> is true for a label then all its possible parent labels must precede the label.
167
private static int TiedToAncestor(
Label
label)
172
case
Label
.ExternAliasDirective:
173
case
Label
.UsingDirective:
174
case
Label
.FieldDeclaration:
175
case
Label
.FieldVariableDeclaration:
176
case
Label
.FieldVariableDeclarator:
177
case
Label
.MethodDeclaration:
178
case
Label
.OperatorDeclaration:
179
case
Label
.ConversionOperatorDeclaration:
180
case
Label
.ConstructorDeclaration:
181
case
Label
.DestructorDeclaration:
182
case
Label
.PropertyDeclaration:
183
case
Label
.ArrowExpressionClause:
184
case
Label
.IndexerDeclaration:
185
case
Label
.EventDeclaration:
186
case
Label
.EnumMemberDeclaration:
187
case
Label
.BaseList:
188
case
Label
.AccessorDeclaration:
189
case
Label
.AccessorList:
190
case
Label
.TypeParameterList:
191
case
Label
.TypeParameter:
192
case
Label
.TypeParameterConstraintClause:
193
case
Label
.ParameterList:
194
case
Label
.BracketedParameterList:
195
case
Label
.Parameter:
196
case
Label
.AttributeList:
197
case
Label
.Attribute:
201
case
Label
.LocalDeclarationStatement:
202
case
Label
.LocalVariableDeclaration:
203
case
Label
.LocalVariableDeclarator:
204
case
Label
.GotoCaseStatement:
205
case
Label
.BreakContinueStatement:
206
case
Label
.ElseClause:
207
case
Label
.CatchClause:
208
case
Label
.CatchDeclaration:
209
case
Label
.CatchFilterClause:
210
case
Label
.FinallyClause:
211
case
Label
.ForStatementPart:
212
case
Label
.YieldReturnStatement:
213
case
Label
.YieldBreakStatement:
214
case
Label
.FromClauseLambda:
215
case
Label
.LetClauseLambda:
216
case
Label
.WhereClauseLambda:
217
case
Label
.OrderByClause:
218
case
Label
.OrderingLambda:
219
case
Label
.SelectClauseLambda:
220
case
Label
.JoinClauseLambda:
221
case
Label
.JoinIntoClause:
222
case
Label
.GroupClauseLambda:
223
case
Label
.QueryContinuation:
224
case
Label
.CasePatternSwitchLabel:
225
case
Label
.WhenClause:
226
case
Label
.SwitchExpressionArm:
237
internal
Label
Classify(SyntaxKind kind, SyntaxNode? node, out bool isLeaf)
247
return
Label
.ForStatementPart;
259
return
Label
.CompilationUnit;
262
return
Label
.TypeParameterList;
265
return
Label
.TypeParameterConstraintClause;
269
return
Label
.TypeParameter;
272
return
Label
.BracketedParameterList;
275
return
Label
.ParameterList;
278
return
Label
.Parameter;
282
return
Label
.ConstructorDeclaration;
293
private static
Label
ClassifyStatementSyntax(SyntaxKind kind, SyntaxNode? node, out bool isLeaf)
330
return
Label
.Ignored;
333
return
Label
.LocalDeclarationStatement;
336
return
Label
.SingleVariableDesignation;
339
return
Label
.LabeledStatement;
343
return
Label
.ExpressionStatement;
347
return
Label
.GotoStatement;
352
return
Label
.GotoCaseStatement;
357
return
Label
.BreakContinueStatement;
361
return
Label
.ReturnThrowStatement;
364
return
Label
.ExpressionStatement;
368
return
Label
.YieldBreakStatement;
371
return
Label
.YieldReturnStatement;
374
return
Label
.DoStatement;
377
return
Label
.WhileStatement;
380
return
Label
.ForStatement;
384
return
Label
.ForEachStatement;
394
return node is UsingStatementSyntax { Declaration: not null } ?
Label
.UsingStatementWithDeclarations :
Label
.UsingStatementWithExpression;
397
return
Label
.FixedStatement;
401
return
Label
.CheckedStatement;
404
return
Label
.UnsafeStatement;
407
return
Label
.LockStatement;
410
return
Label
.IfStatement;
413
return
Label
.ElseClause;
416
return
Label
.SwitchStatement;
419
return
Label
.SwitchSection;
426
return
Label
.Ignored;
429
return
Label
.WhenClause;
432
return
Label
.CasePatternSwitchLabel;
435
return
Label
.SwitchExpression;
438
return
Label
.SwitchExpressionArm;
441
return
Label
.TryStatement;
444
return
Label
.CatchClause;
448
return
Label
.CatchDeclaration;
451
return
Label
.CatchFilterClause;
454
return
Label
.FinallyClause;
469
return
Label
.FromClause;
472
return
Label
.FromClauseLambda;
475
return
Label
.QueryBody;
478
return
Label
.QueryContinuation;
481
return
Label
.LetClauseLambda;
484
return
Label
.WhereClauseLambda;
487
return
Label
.OrderByClause;
491
return
Label
.OrderingLambda;
494
return
Label
.SelectClauseLambda;
497
return
Label
.JoinClauseLambda;
500
return
Label
.JoinIntoClause;
503
return
Label
.GroupClauseLambda;
534
return
Label
.Ignored;
537
return
Label
.AwaitExpression;
543
return
Label
.NestedFunction;
546
return
Label
.LocalVariableDeclaration;
549
return
Label
.LocalVariableDeclarator;
552
return
Label
.Block;
557
return
Label
.Ignored;
560
private static
Label
ClassifyTopSyntax(SyntaxKind kind, SyntaxNode? node, out bool isLeaf)
574
return
Label
.GlobalStatement;
578
return
Label
.ExternAliasDirective;
582
return
Label
.UsingDirective;
586
return
Label
.NamespaceDeclaration;
593
return
Label
.TypeDeclaration;
596
return
Label
.BaseList;
601
return
Label
.PrimaryConstructorBase;
604
return
Label
.MethodDeclaration;
607
return
Label
.EnumDeclaration;
610
return
Label
.DelegateDeclaration;
614
return
Label
.FieldDeclaration;
617
return
Label
.ConversionOperatorDeclaration;
620
return
Label
.OperatorDeclaration;
624
return
Label
.DestructorDeclaration;
627
return
Label
.PropertyDeclaration;
630
return
Label
.IndexerDeclaration;
634
return
Label
.ArrowExpressionClause;
639
return
Label
.EventDeclaration;
643
return
Label
.EnumMemberDeclaration;
646
return
Label
.AccessorList;
654
return
Label
.AccessorDeclaration;
659
return
Label
.FieldVariableDeclaration;
664
return
Label
.FieldVariableDeclarator;
670
return
Label
.AttributeList;
680
return
Label
.Attribute;
689
return
Label
.Ignored;
694
=> Classify(kind, node: null, out _) !=
Label
.Ignored;
697
=> (int)
Label
.Count;
700
=> TiedToAncestor((
Label
)label);