193 references to LocalFunctionStatement
Microsoft.CodeAnalysis.CSharp (20)
Binder\Binder_Statements.cs (3)
47if (node.Kind() == SyntaxKind.LocalFunctionStatement) 69case SyntaxKind.LocalFunctionStatement: 343case SyntaxKind.LocalFunctionStatement:
Binder\LocalBinderFactory.cs (1)
1043case SyntaxKind.LocalFunctionStatement:
Binder\LocalScopeBinder.cs (2)
225case SyntaxKind.LocalFunctionStatement: 318if (innerStatement.Kind() == SyntaxKind.LocalFunctionStatement)
Compilation\CSharpSemanticModel.cs (1)
5094case SyntaxKind.LocalFunctionStatement:
Compilation\MemberSemanticModel.cs (3)
251else if (kind == SyntaxKind.LocalFunctionStatement) 850else if (paramList.Parent.Kind() == SyntaxKind.LocalFunctionStatement) 1554if (current.Parent == null || current.Parent.Kind() != SyntaxKind.LocalFunctionStatement)
Parser\LanguageParser.cs (1)
2880case SyntaxKind.LocalFunctionStatement:
Syntax\LambdaUtilities.cs (5)
31case SyntaxKind.LocalFunctionStatement: 61Debug.Assert(lambda.IsKind(SyntaxKind.LocalFunctionStatement)); 115case SyntaxKind.LocalFunctionStatement: 155case SyntaxKind.LocalFunctionStatement: 349case SyntaxKind.LocalFunctionStatement:
Syntax\LookupPosition.cs (2)
365case SyntaxKind.LocalFunctionStatement: 441case SyntaxKind.LocalFunctionStatement:
Syntax\SyntaxFacts.cs (2)
187case LocalFunctionStatement: 566=> kind is SyntaxKind.LocalFunctionStatement
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
33context.RegisterSyntaxNodeAction(AnalyzeSyntax, SyntaxKind.LocalFunctionStatement);
src\Analyzers\CSharp\Analyzers\NamingStyle\CSharpNamingStyleDiagnosticAnalyzer.cs (1)
23SyntaxKind.LocalFunctionStatement,
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (1)
76if (currentStatement.IsKind(SyntaxKind.LocalFunctionStatement))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
28[SyntaxKind.LocalFunctionStatement])
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
17.FirstOrDefault(node => node.Kind() is SyntaxKind.LocalFunctionStatement or SyntaxKind.MethodDeclaration);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
431case SyntaxKind.LocalFunctionStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
198if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentTokenParentParent.IsKind(SyntaxKind.LocalFunctionStatement)) 412if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentTokenParentParent.IsKind(SyntaxKind.LocalFunctionStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
150public int? LocalFunctionStatement => (int)SyntaxKind.LocalFunctionStatement;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
125SyntaxKind.LocalFunctionStatement or
Microsoft.CodeAnalysis.CSharp.Features (24)
ChangeSignature\CSharpChangeSignatureService.cs (2)
49SyntaxKind.LocalFunctionStatement, 88SyntaxKind.LocalFunctionStatement,
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
299.Where(statement => statement.Kind() != SyntaxKind.LocalFunctionStatement).ToArray();
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
936case SyntaxKind.LocalFunctionStatement:
EditAndContinue\BreakpointSpans.cs (1)
418case SyntaxKind.LocalFunctionStatement:
EditAndContinue\SyntaxComparer.cs (4)
542case SyntaxKind.LocalFunctionStatement: 892case SyntaxKind.LocalFunctionStatement: 1017case SyntaxKind.LocalFunctionStatement: 1068case SyntaxKind.LocalFunctionStatement:
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
433var localFunctions = innermostCommonBlock.DescendantNodes().Where(node => node.IsKind(SyntaxKind.LocalFunctionStatement) && matches.Any(match => match.Span.OverlapsWith(node.Span)));
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (1)
257if (syntax.IsKind(SyntaxKind.LocalFunctionStatement) || syntax is AnonymousFunctionExpressionSyntax)
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
33context.RegisterSyntaxNodeAction(AnalyzeSyntax, SyntaxKind.LocalFunctionStatement);
src\Analyzers\CSharp\Analyzers\NamingStyle\CSharpNamingStyleDiagnosticAnalyzer.cs (1)
23SyntaxKind.LocalFunctionStatement,
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (1)
76if (currentStatement.IsKind(SyntaxKind.LocalFunctionStatement))
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
28[SyntaxKind.LocalFunctionStatement])
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
125SyntaxKind.LocalFunctionStatement or
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (5)
31case SyntaxKind.LocalFunctionStatement: 61Debug.Assert(lambda.IsKind(SyntaxKind.LocalFunctionStatement)); 115case SyntaxKind.LocalFunctionStatement: 155case SyntaxKind.LocalFunctionStatement: 349case SyntaxKind.LocalFunctionStatement:
Structure\Providers\ArrowExpressionClauseStructureProvider.cs (1)
30autoCollapse: !node.IsParentKind(SyntaxKind.LocalFunctionStatement)));
Structure\Providers\BlockSyntaxStructureProvider.cs (2)
96if (parentKind == SyntaxKind.LocalFunctionStatement) 218SyntaxKind.LocalFunctionStatement => BlockTypes.Statement,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\LocalFunctionTests.cs (3)
1924var localDecl = tree.FindNodeOrTokenByKind(SyntaxKind.LocalFunctionStatement); 1974var localDecl = tree.FindNodeOrTokenByKind(SyntaxKind.LocalFunctionStatement); 5105var localDecl = (LocalFunctionStatementSyntax)tree.FindNodeOrTokenByKind(SyntaxKind.LocalFunctionStatement).AsNode();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3587Assert.Equal(SyntaxKind.LocalFunctionStatement, methodDecl.Kind());
SymbolDisplay\SymbolDisplayTests.cs (4)
6610.Where(n => n.Kind() == SyntaxKind.LocalFunctionStatement) 6653.Where(n => n.Kind() == SyntaxKind.LocalFunctionStatement) 6687.Where(n => n.Kind() == SyntaxKind.LocalFunctionStatement) 6782.Where(n => n.Kind() == SyntaxKind.LocalFunctionStatement)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (121)
Parsing\CollectionExpressionParsingTests.cs (23)
323N(SyntaxKind.LocalFunctionStatement); 450N(SyntaxKind.LocalFunctionStatement); 583N(SyntaxKind.LocalFunctionStatement); 12077N(SyntaxKind.LocalFunctionStatement); 12423N(SyntaxKind.LocalFunctionStatement); 12490N(SyntaxKind.LocalFunctionStatement); 12557N(SyntaxKind.LocalFunctionStatement); 12640N(SyntaxKind.LocalFunctionStatement); 12737N(SyntaxKind.LocalFunctionStatement); 15586N(SyntaxKind.LocalFunctionStatement); 15653N(SyntaxKind.LocalFunctionStatement); 15740N(SyntaxKind.LocalFunctionStatement); 15819N(SyntaxKind.LocalFunctionStatement); 15918N(SyntaxKind.LocalFunctionStatement); 16001N(SyntaxKind.LocalFunctionStatement); 16104N(SyntaxKind.LocalFunctionStatement); 16195N(SyntaxKind.LocalFunctionStatement); 16306N(SyntaxKind.LocalFunctionStatement); 16402N(SyntaxKind.LocalFunctionStatement); 16518N(SyntaxKind.LocalFunctionStatement); 16601N(SyntaxKind.LocalFunctionStatement); 16704N(SyntaxKind.LocalFunctionStatement); 16785N(SyntaxKind.LocalFunctionStatement);
Parsing\DeclarationParsingTests.cs (22)
7256N(SyntaxKind.LocalFunctionStatement); 7292N(SyntaxKind.LocalFunctionStatement); 7330N(SyntaxKind.LocalFunctionStatement); 7367N(SyntaxKind.LocalFunctionStatement); 7404N(SyntaxKind.LocalFunctionStatement); 7440N(SyntaxKind.LocalFunctionStatement); 7472N(SyntaxKind.LocalFunctionStatement); 7504N(SyntaxKind.LocalFunctionStatement); 7536N(SyntaxKind.LocalFunctionStatement); 7581N(SyntaxKind.LocalFunctionStatement); 7643N(SyntaxKind.LocalFunctionStatement); 7696N(SyntaxKind.LocalFunctionStatement); 7729N(SyntaxKind.LocalFunctionStatement); 7766N(SyntaxKind.LocalFunctionStatement); 7803N(SyntaxKind.LocalFunctionStatement); 7840N(SyntaxKind.LocalFunctionStatement); 7877N(SyntaxKind.LocalFunctionStatement); 7914N(SyntaxKind.LocalFunctionStatement); 7951N(SyntaxKind.LocalFunctionStatement); 7988N(SyntaxKind.LocalFunctionStatement); 8025N(SyntaxKind.LocalFunctionStatement); 8062N(SyntaxKind.LocalFunctionStatement);
Parsing\DeclarationScopeParsingTests.cs (9)
320N(SyntaxKind.LocalFunctionStatement); 345N(SyntaxKind.LocalFunctionStatement); 374N(SyntaxKind.LocalFunctionStatement); 395N(SyntaxKind.LocalFunctionStatement); 437N(SyntaxKind.LocalFunctionStatement); 466N(SyntaxKind.LocalFunctionStatement); 5348N(SyntaxKind.LocalFunctionStatement); 8224N(SyntaxKind.LocalFunctionStatement); 8287N(SyntaxKind.LocalFunctionStatement);
Parsing\DeconstructionTests.cs (8)
2412N(SyntaxKind.LocalFunctionStatement); 2477N(SyntaxKind.LocalFunctionStatement); 2555N(SyntaxKind.LocalFunctionStatement); 2618N(SyntaxKind.LocalFunctionStatement); 2681N(SyntaxKind.LocalFunctionStatement); 2743N(SyntaxKind.LocalFunctionStatement); 2802N(SyntaxKind.LocalFunctionStatement); 2870N(SyntaxKind.LocalFunctionStatement);
Parsing\ExpressionParsingTests.cs (2)
3610N(SyntaxKind.LocalFunctionStatement); 3683N(SyntaxKind.LocalFunctionStatement);
Parsing\FieldKeywordParsingTests.cs (1)
1778N(SyntaxKind.LocalFunctionStatement);
Parsing\FileModifierParsingTests.cs (4)
3037N(SyntaxKind.LocalFunctionStatement); 3098N(SyntaxKind.LocalFunctionStatement); 3306N(SyntaxKind.LocalFunctionStatement); 3438N(SyntaxKind.LocalFunctionStatement);
Parsing\FunctionPointerTests.cs (8)
2358N(SyntaxKind.LocalFunctionStatement); 2402N(SyntaxKind.LocalFunctionStatement); 3361N(SyntaxKind.LocalFunctionStatement); 3435N(SyntaxKind.LocalFunctionStatement); 3514N(SyntaxKind.LocalFunctionStatement); 3587N(SyntaxKind.LocalFunctionStatement); 3887N(SyntaxKind.LocalFunctionStatement); 3975N(SyntaxKind.LocalFunctionStatement);
Parsing\LambdaReturnTypeParsingTests.cs (1)
5021N(SyntaxKind.LocalFunctionStatement);
Parsing\LocalFunctionParsingTests.cs (27)
168N(SyntaxKind.LocalFunctionStatement); 209N(SyntaxKind.LocalFunctionStatement); 292N(SyntaxKind.LocalFunctionStatement); 324N(SyntaxKind.LocalFunctionStatement); 396N(SyntaxKind.LocalFunctionStatement); 426N(SyntaxKind.LocalFunctionStatement); 461N(SyntaxKind.LocalFunctionStatement); 495N(SyntaxKind.LocalFunctionStatement); 659N(SyntaxKind.LocalFunctionStatement); 750N(SyntaxKind.LocalFunctionStatement); 836N(SyntaxKind.LocalFunctionStatement); 1232s => Assert.Equal(SyntaxKind.LocalFunctionStatement, s.Kind())); 1289Assert.True(file.DescendantNodes().Any(n => n.Kind() == SyntaxKind.LocalFunctionStatement && !n.ContainsDiagnostics)); 1427N(SyntaxKind.LocalFunctionStatement); 1577N(SyntaxKind.LocalFunctionStatement); 1766N(SyntaxKind.LocalFunctionStatement); 1881N(SyntaxKind.LocalFunctionStatement); 1899N(SyntaxKind.LocalFunctionStatement); 2066N(SyntaxKind.LocalFunctionStatement); 2084N(SyntaxKind.LocalFunctionStatement); 2162N(SyntaxKind.LocalFunctionStatement); 2245N(SyntaxKind.LocalFunctionStatement); 2335N(SyntaxKind.LocalFunctionStatement); 2432N(SyntaxKind.LocalFunctionStatement); 2617N(SyntaxKind.LocalFunctionStatement); 2972N(SyntaxKind.LocalFunctionStatement); 3099N(SyntaxKind.LocalFunctionStatement);
Parsing\MemberDeclarationParsingTests.cs (1)
9388N(SyntaxKind.LocalFunctionStatement);
Parsing\ParsingErrorRecoveryTests.cs (4)
137N(SyntaxKind.LocalFunctionStatement); 166N(SyntaxKind.LocalFunctionStatement); 188N(SyntaxKind.LocalFunctionStatement); 209N(SyntaxKind.LocalFunctionStatement);
Parsing\PatternParsingTests.cs (2)
9819N(SyntaxKind.LocalFunctionStatement); 11458N(SyntaxKind.LocalFunctionStatement);
Parsing\RecordParsing.cs (1)
127N(SyntaxKind.LocalFunctionStatement);
Parsing\StatementParsingTests.cs (1)
4646N(SyntaxKind.LocalFunctionStatement);
Parsing\TopLevelStatementsParsingTests.cs (7)
471N(SyntaxKind.LocalFunctionStatement); 745N(SyntaxKind.LocalFunctionStatement); 1286N(SyntaxKind.LocalFunctionStatement); 1342N(SyntaxKind.LocalFunctionStatement); 1687N(SyntaxKind.LocalFunctionStatement); 2592N(SyntaxKind.LocalFunctionStatement); 2632N(SyntaxKind.LocalFunctionStatement);
Microsoft.CodeAnalysis.CSharp.Workspaces (10)
CodeGeneration\CSharpSyntaxGenerator.cs (5)
1589case SyntaxKind.LocalFunctionStatement: 2221case SyntaxKind.LocalFunctionStatement: 2285case SyntaxKind.LocalFunctionStatement: 2341case SyntaxKind.LocalFunctionStatement: 2464SyntaxKind.LocalFunctionStatement => ((LocalFunctionStatementSyntax)declaration).Body?.Statements,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
17.FirstOrDefault(node => node.Kind() is SyntaxKind.LocalFunctionStatement or SyntaxKind.MethodDeclaration);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
431case SyntaxKind.LocalFunctionStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
198if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentTokenParentParent.IsKind(SyntaxKind.LocalFunctionStatement)) 412if (currentToken.IsKind(SyntaxKind.OpenBraceToken) && currentTokenParentParent.IsKind(SyntaxKind.LocalFunctionStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
150public int? LocalFunctionStatement => (int)SyntaxKind.LocalFunctionStatement;