575 references to GlobalStatement
Microsoft.CodeAnalysis.CSharp (19)
Binder\LocalBinderFactory.cs (1)
128if (member.Kind() == SyntaxKind.GlobalStatement)
Binder\ScriptLocalScopeBinder.cs (1)
84if (member.Kind() != SyntaxKind.GlobalStatement)
Compilation\CSharpCompilation.cs (1)
793var lastGlobalStatement = (GlobalStatementSyntax?)root.Members.LastOrDefault(m => m.IsKind(SyntaxKind.GlobalStatement));
Compilation\MemberSemanticModel.cs (1)
2176case SyntaxKind.GlobalStatement:
Compilation\SyntaxTreeSemanticModel.cs (5)
937case SyntaxKind.GlobalStatement: 1206case SyntaxKind.GlobalStatement: 1448case SyntaxKind.GlobalStatement: 2415return (node) => node.Kind() != SyntaxKind.GlobalStatement || node.Parent != unit; 2420return (node) => node.Parent != unit || node.Kind() == SyntaxKind.GlobalStatement;
Declarations\DeclarationTreeBuilder.cs (2)
155else if (acceptSimpleProgram && member.IsKind(SyntaxKind.GlobalStatement)) 1243case SyntaxKind.GlobalStatement:
Parser\LanguageParser.cs (2)
773case SyntaxKind.GlobalStatement: 2414case SyntaxKind.GlobalStatement:
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5185case SyntaxKind.GlobalStatement:
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (2)
281public SyntaxNode ReturnTypeSyntax => CompilationUnit.Members.First(m => m.Kind() == SyntaxKind.GlobalStatement); 287if (member.Kind() == SyntaxKind.GlobalStatement && compilation.IsNullableAnalysisEnabledIn(member))
Syntax\SyntaxFactory.cs (1)
2367if (!lastNode.IsKind(SyntaxKind.GlobalStatement))
Syntax\SyntaxKindFacts.cs (1)
364case SyntaxKind.GlobalStatement:
Syntax\SyntaxNormalizer.cs (1)
1328if (node.Parent.Kind() is SyntaxKind.GlobalStatement or SyntaxKind.FileScopedNamespaceDeclaration)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\StatementSyntaxExtensions.cs (2)
40if (first.Parent.IsKind(SyntaxKind.GlobalStatement)) 41return second.Parent.IsKind(SyntaxKind.GlobalStatement);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
452=> node.IsReturnableConstruct() || (node is CompilationUnitSyntax compilationUnit && compilationUnit.Members.Any(SyntaxKind.GlobalStatement));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
721if ((kind != SyntaxKind.GlobalStatement) && (kind != SyntaxKind.IncompleteMember) && (node is TMemberDeclarationSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
168public int? GlobalStatement => (int)SyntaxKind.GlobalStatement;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
111editor.RemoveNode(nextStatement.IsParentKind(SyntaxKind.GlobalStatement) ? nextStatement.GetRequiredParent() : nextStatement);
src\Analyzers\CSharp\CodeFixes\RemoveUnreachableCode\CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
85and not SyntaxKind.GlobalStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
509var insertionIndex = compilationUnit.Members.LastIndexOf(memberDeclaration => memberDeclaration.IsKind(SyntaxKind.GlobalStatement)) + 1; 513else if (destinationMember is StatementSyntax statement && statement.IsParentKind(SyntaxKind.GlobalStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
148case SyntaxKind.GlobalStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
120return statement != null && !statement.IsParentKind(SyntaxKind.GlobalStatement) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1010conditional.Parent.IsParentKind(SyntaxKind.GlobalStatement))
Microsoft.CodeAnalysis.CSharp.Features (13)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
278if (scope.IsKind(SyntaxKind.GlobalStatement))
Completion\KeywordRecommenders\StaticKeywordRecommender.cs (1)
86(context.TargetToken.IsKind(SyntaxKind.UsingKeyword) && context.TargetToken.Parent?.IsParentKind(SyntaxKind.GlobalStatement) == true) ||
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
70if (!memberDeclaration.IsKind(SyntaxKind.GlobalStatement) && !memberDeclaration.GetModifiers().Any(SyntaxKind.StaticKeyword))
Debugging\LocationInfoGetter.cs (1)
32if ((memberDeclaration == null) || (memberDeclaration.Kind() == SyntaxKind.GlobalStatement))
EditAndContinue\SyntaxComparer.cs (2)
572case SyntaxKind.GlobalStatement: 1095case SyntaxKind.GlobalStatement:
ExtractMethod\CSharpSelectionResult.cs (1)
208Contract.ThrowIfFalse(last.IsParentKind(SyntaxKind.GlobalStatement));
ExtractMethod\CSharpSelectionValidator.cs (1)
92|| selectionInfo.CommonRootFromOriginalSpan.IsParentKind(SyntaxKind.GlobalStatement))
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
98&& node.Parent?.Kind() is SyntaxKind.Block or SyntaxKind.SwitchSection or SyntaxKind.GlobalStatement;
RemoveUnusedVariable\CSharpRemoveUnusedVariableCodeFixProvider.cs (1)
65RemoveNode(editor, node.IsParentKind(SyntaxKind.GlobalStatement) ? node.Parent : node, blockFacts);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
111editor.RemoveNode(nextStatement.IsParentKind(SyntaxKind.GlobalStatement) ? nextStatement.GetRequiredParent() : nextStatement);
src\Analyzers\CSharp\CodeFixes\RemoveUnreachableCode\CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
85and not SyntaxKind.GlobalStatement)
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
100parent.IsParentKind(SyntaxKind.GlobalStatement);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\TopLevelStatementsTests.cs (1)
6431context.RegisterSyntaxNodeAction(Handle1, SyntaxKind.GlobalStatement);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3686var globalStmt = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf('/')).Parent.AncestorsAndSelf().Single(x => x.IsKind(SyntaxKind.GlobalStatement));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (516)
IncrementalParsing\IncrementalParsingTests.cs (3)
442SyntaxKind.GlobalStatement, 466SyntaxKind.GlobalStatement, 468SyntaxKind.GlobalStatement,
Parsing\CollectionExpressionParsingTests.cs (78)
54N(SyntaxKind.GlobalStatement); 117N(SyntaxKind.GlobalStatement); 178N(SyntaxKind.GlobalStatement); 262N(SyntaxKind.GlobalStatement); 274N(SyntaxKind.GlobalStatement); 286N(SyntaxKind.GlobalStatement); 321N(SyntaxKind.GlobalStatement); 385N(SyntaxKind.GlobalStatement); 448N(SyntaxKind.GlobalStatement); 527N(SyntaxKind.GlobalStatement); 539N(SyntaxKind.GlobalStatement); 551N(SyntaxKind.GlobalStatement); 581N(SyntaxKind.GlobalStatement); 637N(SyntaxKind.GlobalStatement); 700N(SyntaxKind.GlobalStatement); 767N(SyntaxKind.GlobalStatement); 826N(SyntaxKind.GlobalStatement); 889N(SyntaxKind.GlobalStatement); 944N(SyntaxKind.GlobalStatement); 1007N(SyntaxKind.GlobalStatement); 1117N(SyntaxKind.GlobalStatement); 1188N(SyntaxKind.GlobalStatement); 1244N(SyntaxKind.GlobalStatement); 1318N(SyntaxKind.GlobalStatement); 1478N(SyntaxKind.GlobalStatement); 1549N(SyntaxKind.GlobalStatement); 1581N(SyntaxKind.GlobalStatement); 1627N(SyntaxKind.GlobalStatement); 1680N(SyntaxKind.GlobalStatement); 1723N(SyntaxKind.GlobalStatement); 1766N(SyntaxKind.GlobalStatement); 1804N(SyntaxKind.GlobalStatement); 5699N(SyntaxKind.GlobalStatement); 6209N(SyntaxKind.GlobalStatement); 9175N(SyntaxKind.GlobalStatement); 9224N(SyntaxKind.GlobalStatement); 9273N(SyntaxKind.GlobalStatement); 9326N(SyntaxKind.GlobalStatement); 9474N(SyntaxKind.GlobalStatement); 9633N(SyntaxKind.GlobalStatement); 9792N(SyntaxKind.GlobalStatement); 9951N(SyntaxKind.GlobalStatement); 10086N(SyntaxKind.GlobalStatement); 10203N(SyntaxKind.GlobalStatement); 10335N(SyntaxKind.GlobalStatement); 10467N(SyntaxKind.GlobalStatement); 10595N(SyntaxKind.GlobalStatement); 10750N(SyntaxKind.GlobalStatement); 10901N(SyntaxKind.GlobalStatement); 11067N(SyntaxKind.GlobalStatement); 11233N(SyntaxKind.GlobalStatement); 11415N(SyntaxKind.GlobalStatement); 11593N(SyntaxKind.GlobalStatement); 11748N(SyntaxKind.GlobalStatement); 11906N(SyntaxKind.GlobalStatement); 12075N(SyntaxKind.GlobalStatement); 12197N(SyntaxKind.GlobalStatement); 12286N(SyntaxKind.GlobalStatement); 12387N(SyntaxKind.GlobalStatement); 12421N(SyntaxKind.GlobalStatement); 12488N(SyntaxKind.GlobalStatement); 12555N(SyntaxKind.GlobalStatement); 12638N(SyntaxKind.GlobalStatement); 12735N(SyntaxKind.GlobalStatement); 14096N(SyntaxKind.GlobalStatement); 14295N(SyntaxKind.GlobalStatement); 14516N(SyntaxKind.GlobalStatement); 14752N(SyntaxKind.GlobalStatement); 14989N(SyntaxKind.GlobalStatement); 15215N(SyntaxKind.GlobalStatement); 15448N(SyntaxKind.GlobalStatement); 15651N(SyntaxKind.GlobalStatement); 15817N(SyntaxKind.GlobalStatement); 15999N(SyntaxKind.GlobalStatement); 16193N(SyntaxKind.GlobalStatement); 16400N(SyntaxKind.GlobalStatement); 16599N(SyntaxKind.GlobalStatement); 16783N(SyntaxKind.GlobalStatement);
Parsing\DeclarationParsingTests.cs (3)
8304N(SyntaxKind.GlobalStatement); 8616N(SyntaxKind.GlobalStatement); 9487N(SyntaxKind.GlobalStatement);
Parsing\DeclarationScopeParsingTests.cs (178)
318N(SyntaxKind.GlobalStatement); 343N(SyntaxKind.GlobalStatement); 372N(SyntaxKind.GlobalStatement); 393N(SyntaxKind.GlobalStatement); 435N(SyntaxKind.GlobalStatement); 464N(SyntaxKind.GlobalStatement); 1860N(SyntaxKind.GlobalStatement); 1882N(SyntaxKind.GlobalStatement); 1940N(SyntaxKind.GlobalStatement); 1975N(SyntaxKind.GlobalStatement); 2027N(SyntaxKind.GlobalStatement); 2050N(SyntaxKind.GlobalStatement); 2095N(SyntaxKind.GlobalStatement); 2113N(SyntaxKind.GlobalStatement); 2202N(SyntaxKind.GlobalStatement); 2228N(SyntaxKind.GlobalStatement); 2258N(SyntaxKind.GlobalStatement); 2308N(SyntaxKind.GlobalStatement); 2334N(SyntaxKind.GlobalStatement); 2364N(SyntaxKind.GlobalStatement); 2414N(SyntaxKind.GlobalStatement); 2436N(SyntaxKind.GlobalStatement); 2462N(SyntaxKind.GlobalStatement); 2506N(SyntaxKind.GlobalStatement); 2561N(SyntaxKind.GlobalStatement); 2583N(SyntaxKind.GlobalStatement); 2624N(SyntaxKind.GlobalStatement); 2646N(SyntaxKind.GlobalStatement); 2693N(SyntaxKind.GlobalStatement); 2732N(SyntaxKind.GlobalStatement); 2784N(SyntaxKind.GlobalStatement); 2807N(SyntaxKind.GlobalStatement); 2852N(SyntaxKind.GlobalStatement); 2870N(SyntaxKind.GlobalStatement); 2924N(SyntaxKind.GlobalStatement); 2965N(SyntaxKind.GlobalStatement); 2983N(SyntaxKind.GlobalStatement); 3112N(SyntaxKind.GlobalStatement); 3134N(SyntaxKind.GlobalStatement); 3304N(SyntaxKind.GlobalStatement); 3492N(SyntaxKind.GlobalStatement); 3559N(SyntaxKind.GlobalStatement); 3645N(SyntaxKind.GlobalStatement); 3665N(SyntaxKind.GlobalStatement); 3721N(SyntaxKind.GlobalStatement); 3741N(SyntaxKind.GlobalStatement); 3782N(SyntaxKind.GlobalStatement); 3875N(SyntaxKind.GlobalStatement); 3895N(SyntaxKind.GlobalStatement); 3959N(SyntaxKind.GlobalStatement); 3979N(SyntaxKind.GlobalStatement); 4021N(SyntaxKind.GlobalStatement); 4104N(SyntaxKind.GlobalStatement); 4120N(SyntaxKind.GlobalStatement); 4161N(SyntaxKind.GlobalStatement); 4248N(SyntaxKind.GlobalStatement); 4264N(SyntaxKind.GlobalStatement); 4309N(SyntaxKind.GlobalStatement); 4397N(SyntaxKind.GlobalStatement); 4413N(SyntaxKind.GlobalStatement); 4459N(SyntaxKind.GlobalStatement); 4530N(SyntaxKind.GlobalStatement); 4605N(SyntaxKind.GlobalStatement); 4681N(SyntaxKind.GlobalStatement); 4756N(SyntaxKind.GlobalStatement); 4827N(SyntaxKind.GlobalStatement); 4898N(SyntaxKind.GlobalStatement); 4973N(SyntaxKind.GlobalStatement); 5049N(SyntaxKind.GlobalStatement); 5116N(SyntaxKind.GlobalStatement); 5199N(SyntaxKind.GlobalStatement); 5215N(SyntaxKind.GlobalStatement); 5272N(SyntaxKind.GlobalStatement); 5288N(SyntaxKind.GlobalStatement); 5346N(SyntaxKind.GlobalStatement); 5380N(SyntaxKind.GlobalStatement); 5433N(SyntaxKind.GlobalStatement); 5503N(SyntaxKind.GlobalStatement); 5556N(SyntaxKind.GlobalStatement); 5635N(SyntaxKind.GlobalStatement); 5706N(SyntaxKind.GlobalStatement); 5801N(SyntaxKind.GlobalStatement); 5835N(SyntaxKind.GlobalStatement); 5869N(SyntaxKind.GlobalStatement); 5906N(SyntaxKind.GlobalStatement); 5958N(SyntaxKind.GlobalStatement); 6027N(SyntaxKind.GlobalStatement); 6096N(SyntaxKind.GlobalStatement); 6160N(SyntaxKind.GlobalStatement); 6235N(SyntaxKind.GlobalStatement); 6266N(SyntaxKind.GlobalStatement); 6322N(SyntaxKind.GlobalStatement); 6353N(SyntaxKind.GlobalStatement); 6390N(SyntaxKind.GlobalStatement); 6456N(SyntaxKind.GlobalStatement); 6517N(SyntaxKind.GlobalStatement); 6587N(SyntaxKind.GlobalStatement); 6649N(SyntaxKind.GlobalStatement); 6728N(SyntaxKind.GlobalStatement); 6764N(SyntaxKind.GlobalStatement); 6801N(SyntaxKind.GlobalStatement); 6857N(SyntaxKind.GlobalStatement); 6917N(SyntaxKind.GlobalStatement); 6978N(SyntaxKind.GlobalStatement); 7038N(SyntaxKind.GlobalStatement); 7094N(SyntaxKind.GlobalStatement); 7150N(SyntaxKind.GlobalStatement); 7210N(SyntaxKind.GlobalStatement); 7271N(SyntaxKind.GlobalStatement); 7323N(SyntaxKind.GlobalStatement); 7389N(SyntaxKind.GlobalStatement); 7461N(SyntaxKind.GlobalStatement); 7532N(SyntaxKind.GlobalStatement); 7607N(SyntaxKind.GlobalStatement); 7677N(SyntaxKind.GlobalStatement); 7745N(SyntaxKind.GlobalStatement); 7817N(SyntaxKind.GlobalStatement); 7884N(SyntaxKind.GlobalStatement); 7945N(SyntaxKind.GlobalStatement); 8001N(SyntaxKind.GlobalStatement); 8054N(SyntaxKind.GlobalStatement); 8103N(SyntaxKind.GlobalStatement); 8123N(SyntaxKind.GlobalStatement); 8202N(SyntaxKind.GlobalStatement); 8222N(SyntaxKind.GlobalStatement); 8265N(SyntaxKind.GlobalStatement); 8285N(SyntaxKind.GlobalStatement); 11131N(SyntaxKind.GlobalStatement); 11234N(SyntaxKind.GlobalStatement); 11689N(SyntaxKind.GlobalStatement); 11707N(SyntaxKind.GlobalStatement); 11744N(SyntaxKind.GlobalStatement); 11763N(SyntaxKind.GlobalStatement); 11803N(SyntaxKind.GlobalStatement); 11847N(SyntaxKind.GlobalStatement); 11870N(SyntaxKind.GlobalStatement); 11904N(SyntaxKind.GlobalStatement); 11924N(SyntaxKind.GlobalStatement); 11948N(SyntaxKind.GlobalStatement); 11989N(SyntaxKind.GlobalStatement); 12034N(SyntaxKind.GlobalStatement); 12058N(SyntaxKind.GlobalStatement); 12086N(SyntaxKind.GlobalStatement); 12130N(SyntaxKind.GlobalStatement); 12176N(SyntaxKind.GlobalStatement); 12218N(SyntaxKind.GlobalStatement); 12273N(SyntaxKind.GlobalStatement); 12333N(SyntaxKind.GlobalStatement); 12365N(SyntaxKind.GlobalStatement); 12390N(SyntaxKind.GlobalStatement); 12452N(SyntaxKind.GlobalStatement); 12519N(SyntaxKind.GlobalStatement); 12570N(SyntaxKind.GlobalStatement); 12622N(SyntaxKind.GlobalStatement); 12668N(SyntaxKind.GlobalStatement); 12724N(SyntaxKind.GlobalStatement); 12774N(SyntaxKind.GlobalStatement); 12831N(SyntaxKind.GlobalStatement); 12882N(SyntaxKind.GlobalStatement); 12928N(SyntaxKind.GlobalStatement); 12978N(SyntaxKind.GlobalStatement); 13029N(SyntaxKind.GlobalStatement); 13079N(SyntaxKind.GlobalStatement); 13125N(SyntaxKind.GlobalStatement); 13179N(SyntaxKind.GlobalStatement); 13225N(SyntaxKind.GlobalStatement); 13275N(SyntaxKind.GlobalStatement); 13326N(SyntaxKind.GlobalStatement); 13368N(SyntaxKind.GlobalStatement); 13420N(SyntaxKind.GlobalStatement); 13483N(SyntaxKind.GlobalStatement); 13515N(SyntaxKind.GlobalStatement); 14563N(SyntaxKind.GlobalStatement); 14610N(SyntaxKind.GlobalStatement); 14657N(SyntaxKind.GlobalStatement); 14714N(SyntaxKind.GlobalStatement); 14790N(SyntaxKind.GlobalStatement); 14876N(SyntaxKind.GlobalStatement);
Parsing\DeconstructionTests.cs (11)
1583N(SyntaxKind.GlobalStatement); 1660N(SyntaxKind.GlobalStatement); 1740N(SyntaxKind.GlobalStatement); 2410N(SyntaxKind.GlobalStatement); 2475N(SyntaxKind.GlobalStatement); 2553N(SyntaxKind.GlobalStatement); 2616N(SyntaxKind.GlobalStatement); 2679N(SyntaxKind.GlobalStatement); 2741N(SyntaxKind.GlobalStatement); 2800N(SyntaxKind.GlobalStatement); 2868N(SyntaxKind.GlobalStatement);
Parsing\ExpressionParsingTests.cs (10)
1383N(SyntaxKind.GlobalStatement); 1465N(SyntaxKind.GlobalStatement); 1533N(SyntaxKind.GlobalStatement); 1561N(SyntaxKind.GlobalStatement); 1619N(SyntaxKind.GlobalStatement); 1647N(SyntaxKind.GlobalStatement); 1699N(SyntaxKind.GlobalStatement); 1727N(SyntaxKind.GlobalStatement); 1775N(SyntaxKind.GlobalStatement); 1807N(SyntaxKind.GlobalStatement);
Parsing\FileModifierParsingTests.cs (22)
150N(SyntaxKind.GlobalStatement); 293N(SyntaxKind.GlobalStatement); 356N(SyntaxKind.GlobalStatement); 419N(SyntaxKind.GlobalStatement); 2052N(SyntaxKind.GlobalStatement); 2105N(SyntaxKind.GlobalStatement); 2147N(SyntaxKind.GlobalStatement); 2181N(SyntaxKind.GlobalStatement); 2231N(SyntaxKind.GlobalStatement); 2296N(SyntaxKind.GlobalStatement); 2359N(SyntaxKind.GlobalStatement); 2422N(SyntaxKind.GlobalStatement); 3034N(SyntaxKind.GlobalStatement); 3095N(SyntaxKind.GlobalStatement); 3157N(SyntaxKind.GlobalStatement); 3197N(SyntaxKind.GlobalStatement); 3239N(SyntaxKind.GlobalStatement); 3257N(SyntaxKind.GlobalStatement); 3303N(SyntaxKind.GlobalStatement); 3377N(SyntaxKind.GlobalStatement); 3435N(SyntaxKind.GlobalStatement); 3456N(SyntaxKind.GlobalStatement);
Parsing\FunctionPointerTests.cs (7)
2356N(SyntaxKind.GlobalStatement); 3359N(SyntaxKind.GlobalStatement); 3433N(SyntaxKind.GlobalStatement); 3512N(SyntaxKind.GlobalStatement); 3585N(SyntaxKind.GlobalStatement); 3885N(SyntaxKind.GlobalStatement); 3973N(SyntaxKind.GlobalStatement);
Parsing\LambdaParameterParsingTests.cs (3)
5486N(SyntaxKind.GlobalStatement); 5525N(SyntaxKind.GlobalStatement); 5533N(SyntaxKind.GlobalStatement);
Parsing\LambdaReturnTypeParsingTests.cs (3)
2769N(SyntaxKind.GlobalStatement); 2830N(SyntaxKind.GlobalStatement); 5019N(SyntaxKind.GlobalStatement);
Parsing\MemberDeclarationParsingTests.cs (3)
2270N(SyntaxKind.GlobalStatement); 2288N(SyntaxKind.GlobalStatement); 8646N(SyntaxKind.GlobalStatement);
Parsing\ParsingErrorRecoveryTests.cs (19)
135N(SyntaxKind.GlobalStatement); 164N(SyntaxKind.GlobalStatement); 186N(SyntaxKind.GlobalStatement); 207N(SyntaxKind.GlobalStatement); 8054N(SyntaxKind.GlobalStatement); 8094N(SyntaxKind.GlobalStatement); 8138N(SyntaxKind.GlobalStatement); 8188N(SyntaxKind.GlobalStatement); 8238N(SyntaxKind.GlobalStatement); 8292N(SyntaxKind.GlobalStatement); 8332N(SyntaxKind.GlobalStatement); 8373N(SyntaxKind.GlobalStatement); 8392N(SyntaxKind.GlobalStatement); 8411N(SyntaxKind.GlobalStatement); 8454N(SyntaxKind.GlobalStatement); 8473N(SyntaxKind.GlobalStatement); 8492N(SyntaxKind.GlobalStatement); 8533N(SyntaxKind.GlobalStatement); 8575N(SyntaxKind.GlobalStatement);
Parsing\RecordParsing.cs (12)
125N(SyntaxKind.GlobalStatement); 282N(SyntaxKind.GlobalStatement); 1290N(SyntaxKind.GlobalStatement); 1316N(SyntaxKind.GlobalStatement); 1323N(SyntaxKind.GlobalStatement); 2770N(SyntaxKind.GlobalStatement); 2965N(SyntaxKind.GlobalStatement); 3149N(SyntaxKind.GlobalStatement); 3481N(SyntaxKind.GlobalStatement); 3757N(SyntaxKind.GlobalStatement); 3891N(SyntaxKind.GlobalStatement); 3956N(SyntaxKind.GlobalStatement);
Parsing\ScriptParsingTests.cs (87)
103N(SyntaxKind.GlobalStatement); 157N(SyntaxKind.GlobalStatement); 211N(SyntaxKind.GlobalStatement); 315N(SyntaxKind.GlobalStatement); 348N(SyntaxKind.GlobalStatement); 387N(SyntaxKind.GlobalStatement); 425N(SyntaxKind.GlobalStatement); 1158N(SyntaxKind.GlobalStatement); 1208N(SyntaxKind.GlobalStatement); 1337N(SyntaxKind.GlobalStatement); 1419N(SyntaxKind.GlobalStatement); 1456N(SyntaxKind.GlobalStatement); 2008N(SyntaxKind.GlobalStatement); 2616N(SyntaxKind.GlobalStatement); 2648N(SyntaxKind.GlobalStatement); 2680N(SyntaxKind.GlobalStatement); 4564N(SyntaxKind.GlobalStatement); 4605N(SyntaxKind.GlobalStatement); 4649N(SyntaxKind.GlobalStatement); 4701N(SyntaxKind.GlobalStatement); 4753N(SyntaxKind.GlobalStatement); 4802N(SyntaxKind.GlobalStatement); 4851N(SyntaxKind.GlobalStatement); 4901N(SyntaxKind.GlobalStatement); 4959N(SyntaxKind.GlobalStatement); 5017N(SyntaxKind.GlobalStatement); 5078N(SyntaxKind.GlobalStatement); 5147N(SyntaxKind.GlobalStatement); 5199N(SyntaxKind.GlobalStatement); 5259N(SyntaxKind.GlobalStatement); 5321N(SyntaxKind.GlobalStatement); 5391N(SyntaxKind.GlobalStatement); 5467N(SyntaxKind.GlobalStatement); 5545N(SyntaxKind.GlobalStatement); 5626N(SyntaxKind.GlobalStatement); 5721N(SyntaxKind.GlobalStatement); 5811N(SyntaxKind.GlobalStatement); 5860N(SyntaxKind.GlobalStatement); 5916N(SyntaxKind.GlobalStatement); 5965N(SyntaxKind.GlobalStatement); 6024N(SyntaxKind.GlobalStatement); 6088N(SyntaxKind.GlobalStatement); 6175N(SyntaxKind.GlobalStatement); 6228N(SyntaxKind.GlobalStatement); 6343N(SyntaxKind.GlobalStatement); 6400N(SyntaxKind.GlobalStatement); 6449N(SyntaxKind.GlobalStatement); 6495N(SyntaxKind.GlobalStatement); 6547N(SyntaxKind.GlobalStatement); 6607N(SyntaxKind.GlobalStatement); 6676N(SyntaxKind.GlobalStatement); 6751N(SyntaxKind.GlobalStatement); 6820N(SyntaxKind.GlobalStatement); 6882N(SyntaxKind.GlobalStatement); 6952N(SyntaxKind.GlobalStatement); 7022N(SyntaxKind.GlobalStatement); 7092N(SyntaxKind.GlobalStatement); 7162N(SyntaxKind.GlobalStatement); 7232N(SyntaxKind.GlobalStatement); 7302N(SyntaxKind.GlobalStatement); 7376N(SyntaxKind.GlobalStatement); 7459N(SyntaxKind.GlobalStatement); 7536N(SyntaxKind.GlobalStatement); 7592N(SyntaxKind.GlobalStatement); 7663N(SyntaxKind.GlobalStatement); 7737N(SyntaxKind.GlobalStatement); 7801N(SyntaxKind.GlobalStatement); 7902N(SyntaxKind.GlobalStatement); 7971N(SyntaxKind.GlobalStatement); 8084N(SyntaxKind.GlobalStatement); 8139N(SyntaxKind.GlobalStatement); 8209N(SyntaxKind.GlobalStatement); 8285N(SyntaxKind.GlobalStatement); 8363N(SyntaxKind.GlobalStatement); 8828N(SyntaxKind.GlobalStatement); 8884N(SyntaxKind.GlobalStatement); 8944N(SyntaxKind.GlobalStatement); 9004N(SyntaxKind.GlobalStatement); 9068N(SyntaxKind.GlobalStatement); 9119N(SyntaxKind.GlobalStatement); 9189N(SyntaxKind.GlobalStatement); 9208N(SyntaxKind.GlobalStatement); 9300N(SyntaxKind.GlobalStatement); 9357N(SyntaxKind.GlobalStatement); 9415N(SyntaxKind.GlobalStatement); 9612Assert.Equal(SyntaxKind.GlobalStatement, tree.GetCompilationUnitRoot().ChildNodes().ToList()[0].Kind()); 9664Assert.Equal(SyntaxKind.GlobalStatement, statement.Kind());
Parsing\TopLevelStatementsParsingTests.cs (58)
35N(SyntaxKind.GlobalStatement); 67N(SyntaxKind.GlobalStatement); 139N(SyntaxKind.GlobalStatement); 164N(SyntaxKind.GlobalStatement); 189N(SyntaxKind.GlobalStatement); 300N(SyntaxKind.GlobalStatement); 351N(SyntaxKind.GlobalStatement); 415N(SyntaxKind.GlobalStatement); 469N(SyntaxKind.GlobalStatement); 533N(SyntaxKind.GlobalStatement); 623N(SyntaxKind.GlobalStatement); 743N(SyntaxKind.GlobalStatement); 827N(SyntaxKind.GlobalStatement); 903N(SyntaxKind.GlobalStatement); 942N(SyntaxKind.GlobalStatement); 1030N(SyntaxKind.GlobalStatement); 1060N(SyntaxKind.GlobalStatement); 1111N(SyntaxKind.GlobalStatement); 1166N(SyntaxKind.GlobalStatement); 1209N(SyntaxKind.GlobalStatement); 1284N(SyntaxKind.GlobalStatement); 1340N(SyntaxKind.GlobalStatement); 1386N(SyntaxKind.GlobalStatement); 1420N(SyntaxKind.GlobalStatement); 1479N(SyntaxKind.GlobalStatement); 1498N(SyntaxKind.GlobalStatement); 1587N(SyntaxKind.GlobalStatement); 1685N(SyntaxKind.GlobalStatement); 1724N(SyntaxKind.GlobalStatement); 1830N(SyntaxKind.GlobalStatement); 1884N(SyntaxKind.GlobalStatement); 1928N(SyntaxKind.GlobalStatement); 1975N(SyntaxKind.GlobalStatement); 2016N(SyntaxKind.GlobalStatement); 2063N(SyntaxKind.GlobalStatement); 2248N(SyntaxKind.GlobalStatement); 2267N(SyntaxKind.GlobalStatement); 2323N(SyntaxKind.GlobalStatement); 2383N(SyntaxKind.GlobalStatement); 2454N(SyntaxKind.GlobalStatement); 2516N(SyntaxKind.GlobalStatement); 2545N(SyntaxKind.GlobalStatement); 2564N(SyntaxKind.GlobalStatement); 2590N(SyntaxKind.GlobalStatement); 2630N(SyntaxKind.GlobalStatement); 2728N(SyntaxKind.GlobalStatement); 2769N(SyntaxKind.GlobalStatement); 2796N(SyntaxKind.GlobalStatement); 2838N(SyntaxKind.GlobalStatement); 2856N(SyntaxKind.GlobalStatement); 3076N(SyntaxKind.GlobalStatement); 3228N(SyntaxKind.GlobalStatement); 3390N(SyntaxKind.GlobalStatement); 3408N(SyntaxKind.GlobalStatement); 3459N(SyntaxKind.GlobalStatement); 3477N(SyntaxKind.GlobalStatement); 3521N(SyntaxKind.GlobalStatement); 3579M(SyntaxKind.GlobalStatement);
Parsing\UsingDirectiveParsingTests.cs (15)
44N(SyntaxKind.GlobalStatement); 75N(SyntaxKind.GlobalStatement); 114N(SyntaxKind.GlobalStatement); 170N(SyntaxKind.GlobalStatement); 205N(SyntaxKind.GlobalStatement); 256N(SyntaxKind.GlobalStatement); 325N(SyntaxKind.GlobalStatement); 407N(SyntaxKind.GlobalStatement); 467N(SyntaxKind.GlobalStatement); 506N(SyntaxKind.GlobalStatement); 565N(SyntaxKind.GlobalStatement); 3436N(SyntaxKind.GlobalStatement); 3493N(SyntaxKind.GlobalStatement); 3546N(SyntaxKind.GlobalStatement); 3593N(SyntaxKind.GlobalStatement);
Syntax\SyntaxTreeTests.cs (4)
1088N(SyntaxKind.GlobalStatement); 1144N(SyntaxKind.GlobalStatement); 1216N(SyntaxKind.GlobalStatement); 1274N(SyntaxKind.GlobalStatement);
Microsoft.CodeAnalysis.CSharp.Workspaces (13)
CodeGeneration\CSharpSyntaxGenerator.cs (3)
2880if (declaration.Parent.IsKind(SyntaxKind.GlobalStatement)) 2919if (declaration.Parent.IsKind(SyntaxKind.GlobalStatement)) 2990if (node.Parent.IsKind(SyntaxKind.GlobalStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\StatementSyntaxExtensions.cs (2)
40if (first.Parent.IsKind(SyntaxKind.GlobalStatement)) 41return second.Parent.IsKind(SyntaxKind.GlobalStatement);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
452=> node.IsReturnableConstruct() || (node is CompilationUnitSyntax compilationUnit && compilationUnit.Members.Any(SyntaxKind.GlobalStatement));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
721if ((kind != SyntaxKind.GlobalStatement) && (kind != SyntaxKind.IncompleteMember) && (node is TMemberDeclarationSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
168public int? GlobalStatement => (int)SyntaxKind.GlobalStatement;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
509var insertionIndex = compilationUnit.Members.LastIndexOf(memberDeclaration => memberDeclaration.IsKind(SyntaxKind.GlobalStatement)) + 1; 513else if (destinationMember is StatementSyntax statement && statement.IsParentKind(SyntaxKind.GlobalStatement))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
148case SyntaxKind.GlobalStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
120return statement != null && !statement.IsParentKind(SyntaxKind.GlobalStatement) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1010conditional.Parent.IsParentKind(SyntaxKind.GlobalStatement))