93 references to LabeledStatementSyntax
Microsoft.CodeAnalysis.CSharp (30)
Binder\Binder_Statements.cs (2)
107result = BindLabeled((LabeledStatementSyntax)node, diagnostics); 469private BoundLabeledStatement BindLabeled(LabeledStatementSyntax node, BindingDiagnosticBag diagnostics)
Binder\LocalBinderFactory.cs (1)
847public override void VisitLabeledStatement(LabeledStatementSyntax node)
Binder\LocalScopeBinder.cs (4)
181innerStatement = ((LabeledStatementSyntax)innerStatement).Statement; 315innerStatement = ((LabeledStatementSyntax)innerStatement).Statement; 366var labeledStatement = (LabeledStatementSyntax)statement;
Compilation\CSharpSemanticModel.cs (2)
3175public abstract ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken)); 5090return this.GetDeclaredSymbol((LabeledStatementSyntax)node, cancellationToken);
Compilation\MemberSemanticModel.cs (1)
751public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
345public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (1)
1882public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
CSharpExtensions.cs (1)
1526public static ILabelSymbol? GetDeclaredSymbol(this SemanticModel? semanticModel, LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
FlowAnalysis\EntryPointsWalker.cs (5)
23internal static IEnumerable<LabeledStatementSyntax> Analyze(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion, out bool? succeeded) 32return badRegion ? SpecializedCollections.EmptyEnumerable<LabeledStatementSyntax>() : result; 40private readonly HashSet<LabeledStatementSyntax> _entryPoints = new HashSet<LabeledStatementSyntax>(); 62_entryPoints.Add((LabeledStatementSyntax)targetStmt.Syntax);
Lowering\Instrumentation\DebugInfoInjector.cs (2)
379var labeledSyntax = (LabeledStatementSyntax)original.Syntax;
Lowering\LocalRewriter\LocalRewriter_LabeledStatement.cs (2)
28var labeledSyntax = node.Syntax as LabeledStatementSyntax;
Parser\LanguageParser.cs (1)
9968private LabeledStatementSyntax ParseLabeledStatement(SyntaxList<AttributeListSyntax> attributes)
Symbols\Source\SourceLabelSymbol.cs (1)
96node = _identifierNodeOrToken.Parent.FirstAncestorOrSelf<LabeledStatementSyntax>();
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5196innerStatement = ((LabeledStatementSyntax)innerStatement).Statement;
Syntax\LabeledStatementSyntax.cs (2)
11public LabeledStatementSyntax Update(SyntaxToken identifier, SyntaxToken colonToken, StatementSyntax statement) 20public static LabeledStatementSyntax LabeledStatement(SyntaxToken identifier, SyntaxToken colonToken, StatementSyntax statement)
Syntax\LookupPosition.cs (2)
345return ((LabeledStatementSyntax)statement).Identifier; 408return GetFirstExcludedToken(((LabeledStatementSyntax)statement).Statement);
Syntax\SyntaxNormalizer.cs (1)
270if (currentToken.Parent is LabeledStatementSyntax || currentToken.Parent is SwitchLabelSyntax)
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
122LabeledStatementSyntax or 137LabeledStatementSyntax n => n.Statement,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (3)
348token.Parent is LabeledStatementSyntax labeledStatement && 358token.Parent is LabeledStatementSyntax labeledStatement && 483return token.Parent.Parent is LabeledStatementSyntax;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
365if (previousToken.Parent is LabeledStatementSyntax or SwitchLabelSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
137if (node is LabeledStatementSyntax labeledStatement)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (2)
186if (token.Parent is LabeledStatementSyntax || token.IsLastTokenInLabelStatement()) 188token = token.GetAncestor<LabeledStatementSyntax>()!.GetFirstToken(includeZeroWidth: true).GetPreviousToken(includeZeroWidth: true);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
SymbolKey\SymbolKeyTestBase.cs (2)
350var labels = body.DescendantNodes().OfType<LabeledStatementSyntax>(); 351foreach (var n in labels)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\GotoTest.cs (4)
1148var label = (LabeledStatementSyntax)tree.FindNodeOrTokenByKind(SyntaxKind.LabeledStatement); 1161var label = (LabeledStatementSyntax)tree.FindNodeOrTokenByKind(SyntaxKind.LabeledStatement);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Semantics\OutVarTests.cs (2)
17529var statement = (LabeledStatementSyntax)SyntaxFactory.ParseStatement(@"
Semantics\PatternMatchingTests_Scope.cs (2)
10715var statement = (LabeledStatementSyntax)SyntaxFactory.ParseStatement(@"
Microsoft.CodeAnalysis.CSharp.Features (8)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (2)
350if (newLocalDeclaration?.Parent is LabeledStatementSyntax labeledStatement) 352var newLabeledStatement = labeledStatement.ReplaceNode(newLocalDeclaration, SyntaxFactory.ParseStatement(""));
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
20public override void VisitLabeledStatement(LabeledStatementSyntax node)
EditAndContinue\BreakpointSpans.cs (2)
599var labeledStatement = (LabeledStatementSyntax)statement;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1831return ((LabeledStatementSyntax)node).Identifier.Span;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
149public override SyntaxNode VisitLabeledStatement(LabeledStatementSyntax node)
ExtractMethod\Extensions.cs (1)
36=> (StatementSyntax)((node.Parent is LabeledStatementSyntax) ? node.Parent : node);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IBranchOperation.Extensions.cs (1)
31var result = GetOuterOperationAndCorrespondingInnerOperation<LabeledStatementSyntax, GotoStatementSyntax>(@"
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (9)
Semantics\ScriptSemanticsTests.cs (1)
523var symbol0 = model.GetDeclaredSymbol((LabeledStatementSyntax)statements[0]);
Semantics\TopLevelStatementsTests.cs (8)
2426var labelDecl = tree1.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single(); 4893var declarator = tree.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single(); 4950var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single()); 4956var symbol2 = model2.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single()); 4978var declarator = tree.GetRoot().DescendantNodes().OfType<LabeledStatementSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (3)
619LabeledStatementSyntax labeled1 = methodDecl.Body.Statements[0]; 624var labeled2 = (LabeledStatementSyntax)labeled1.Statement;
Symbols\Source\DeclaringSyntaxNodeTests.cs (3)
639CheckDeclaringSyntax<LabeledStatementSyntax>(comp, tree, "lab1", SymbolKind.Label); 640CheckDeclaringSyntax<LabeledStatementSyntax>(comp, tree, "lab2", SymbolKind.Label); 641CheckDeclaringSyntax<LabeledStatementSyntax>(comp, tree, "lab3", SymbolKind.Label);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (5)
10586private static LabeledStatementSyntax GenerateLabeledStatement() 12373var node = GenerateLabeledStatement(); 12379var newNode = node.WithAttributeLists(node.AttributeLists).WithIdentifier(node.Identifier).WithColonToken(node.ColonToken).WithStatement(node.Statement); 17193var oldNode = GenerateLabeledStatement(); 17209var oldNode = GenerateLabeledStatement();
Parsing\StatementParsingTests.cs (2)
976var ls = (LabeledStatementSyntax)statement;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Extensions.cs (1)
652declaration is LabeledStatementSyntax ||
Microsoft.CodeAnalysis.CSharp.Workspaces (12)
Classification\ClassificationHelpers.cs (2)
276else if (token.Parent is LabeledStatementSyntax labledStatementSyntax && labledStatementSyntax.Identifier == token) 449if (token.Parent is LabeledStatementSyntax statement &&
Rename\LabelConflictVisitor.cs (1)
36if (statement is LabeledStatementSyntax declarationStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
122LabeledStatementSyntax or 137LabeledStatementSyntax n => n.Statement,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (3)
348token.Parent is LabeledStatementSyntax labeledStatement && 358token.Parent is LabeledStatementSyntax labeledStatement && 483return token.Parent.Parent is LabeledStatementSyntax;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
365if (previousToken.Parent is LabeledStatementSyntax or SwitchLabelSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
137if (node is LabeledStatementSyntax labeledStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (2)
186if (token.Parent is LabeledStatementSyntax || token.IsLastTokenInLabelStatement()) 188token = token.GetAncestor<LabeledStatementSyntax>()!.GetFirstToken(includeZeroWidth: true).GetPreviousToken(includeZeroWidth: true);