504 references to GlobalStatement
Microsoft.CodeAnalysis.CSharp (19)
Binder\LocalBinderFactory.cs (1)
127
if (member.Kind() == SyntaxKind.
GlobalStatement
)
Binder\ScriptLocalScopeBinder.cs (1)
84
if (member.Kind() != SyntaxKind.
GlobalStatement
)
Compilation\CSharpCompilation.cs (1)
776
var lastGlobalStatement = (GlobalStatementSyntax?)root.Members.LastOrDefault(m => m.IsKind(SyntaxKind.
GlobalStatement
));
Compilation\MemberSemanticModel.cs (1)
2149
case SyntaxKind.
GlobalStatement
:
Compilation\SyntaxTreeSemanticModel.cs (5)
933
case SyntaxKind.
GlobalStatement
:
1202
case SyntaxKind.
GlobalStatement
:
1454
case SyntaxKind.
GlobalStatement
:
2411
return (node) => node.Kind() != SyntaxKind.
GlobalStatement
|| node.Parent != unit;
2416
return (node) => node.Parent != unit || node.Kind() == SyntaxKind.
GlobalStatement
;
Declarations\DeclarationTreeBuilder.cs (2)
80
else if (acceptSimpleProgram && member.IsKind(SyntaxKind.
GlobalStatement
))
1084
case SyntaxKind.
GlobalStatement
:
Parser\LanguageParser.cs (2)
605
case SyntaxKind.
GlobalStatement
:
2098
case SyntaxKind.
GlobalStatement
:
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4916
case SyntaxKind.
GlobalStatement
:
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (2)
282
public SyntaxNode ReturnTypeSyntax => CompilationUnit.Members.First(m => m.Kind() == SyntaxKind.
GlobalStatement
);
288
if (member.Kind() == SyntaxKind.
GlobalStatement
&& compilation.IsNullableAnalysisEnabledIn(member))
Syntax\SyntaxFactory.cs (1)
2355
if (!lastNode.IsKind(SyntaxKind.
GlobalStatement
))
Syntax\SyntaxKindFacts.cs (1)
336
case SyntaxKind.
GlobalStatement
:
Syntax\SyntaxNormalizer.cs (1)
1320
if (node.Parent.Kind() is SyntaxKind.
GlobalStatement
or SyntaxKind.FileScopedNamespaceDeclaration)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
CSharpSyntaxFacts.cs (1)
712
if ((kind != SyntaxKind.
GlobalStatement
) && (kind != SyntaxKind.IncompleteMember) && (node is MemberDeclarationSyntax))
CSharpSyntaxKinds.cs (1)
153
public int? GlobalStatement => (int)SyntaxKind.
GlobalStatement
;
StatementSyntaxExtensions.cs (2)
40
if (first.Parent.IsKind(SyntaxKind.
GlobalStatement
))
41
return second.Parent.IsKind(SyntaxKind.
GlobalStatement
);
SyntaxNodeExtensions.cs (1)
533
=> node.IsReturnableConstruct() || (node is CompilationUnitSyntax compilationUnit && compilationUnit.Members.Any(SyntaxKind.
GlobalStatement
));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
115
editor.RemoveNode(nextStatement.IsParentKind(SyntaxKind.
GlobalStatement
) ? nextStatement.GetRequiredParent() : nextStatement);
CSharpCodeGenerationService.cs (2)
511
var insertionIndex = compilationUnit.Members.LastIndexOf(memberDeclaration => memberDeclaration.IsKind(SyntaxKind.
GlobalStatement
)) + 1;
515
else if (destinationMember is StatementSyntax statement && statement.IsParentKind(SyntaxKind.
GlobalStatement
))
CSharpDeclarationComparer.cs (1)
148
case SyntaxKind.
GlobalStatement
:
CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
86
&& !statement.IsParentKind(SyntaxKind.
GlobalStatement
))
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
117
return statement != null && !statement.IsParentKind(SyntaxKind.
GlobalStatement
) &&
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1010
conditional.Parent.IsParentKind(SyntaxKind.
GlobalStatement
))
Microsoft.CodeAnalysis.CSharp.Features (18)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
61
if (container == null || container.IsKind(SyntaxKind.
GlobalStatement
))
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
284
if (scope.IsKind(SyntaxKind.
GlobalStatement
))
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
115
editor.RemoveNode(nextStatement.IsParentKind(SyntaxKind.
GlobalStatement
) ? nextStatement.GetRequiredParent() : nextStatement);
CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
86
&& !statement.IsParentKind(SyntaxKind.
GlobalStatement
))
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
76
if (!memberDeclaration.IsKind(SyntaxKind.
GlobalStatement
) && !memberDeclaration.GetModifiers().Any(SyntaxKind.StaticKeyword))
Debugging\LocationInfoGetter.cs (1)
32
if ((memberDeclaration == null) || (memberDeclaration.Kind() == SyntaxKind.
GlobalStatement
))
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (5)
787
=> node.IsKind(SyntaxKind.
GlobalStatement
);
1403
if (node.IsKind(SyntaxKind.
GlobalStatement
))
1446
if (node.IsKind(SyntaxKind.
GlobalStatement
))
1602
case SyntaxKind.
GlobalStatement
:
1968
case SyntaxKind.
GlobalStatement
:
EditAndContinue\SyntaxComparer.cs (2)
571
case SyntaxKind.
GlobalStatement
:
1086
case SyntaxKind.
GlobalStatement
:
ExtractMethod\CSharpSelectionResult.cs (1)
173
Contract.ThrowIfFalse(last.IsParentKind(SyntaxKind.
GlobalStatement
));
ExtractMethod\CSharpSelectionValidator.cs (1)
103
|| selectionInfo.CommonRootFromOriginalSpan.IsParentKind(SyntaxKind.
GlobalStatement
))
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
103
|| parent.IsKind(SyntaxKind.
GlobalStatement
));
RemoveUnusedVariable\CSharpRemoveUnusedVariableCodeFixProvider.cs (1)
65
RemoveNode(editor, node.IsParentKind(SyntaxKind.
GlobalStatement
) ? node.Parent : node, blockFacts);
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
45
autoCollapse: parentKind == SyntaxKind.LocalFunctionStatement && node.Parent.IsParentKind(SyntaxKind.
GlobalStatement
)));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\TopLevelStatementsTests.cs (1)
6419
context.RegisterSyntaxNodeAction(Handle1, SyntaxKind.
GlobalStatement
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3686
var globalStmt = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf('/')).Parent.AncestorsAndSelf().Single(x => x.IsKind(SyntaxKind.
GlobalStatement
));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (440)
IncrementalParsing\IncrementalParsingTests.cs (3)
440
SyntaxKind.
GlobalStatement
,
464
SyntaxKind.
GlobalStatement
,
466
SyntaxKind.
GlobalStatement
,
Parsing\DeclarationParsingTests.cs (3)
8399
N(SyntaxKind.
GlobalStatement
);
8711
N(SyntaxKind.
GlobalStatement
);
9582
N(SyntaxKind.
GlobalStatement
);
Parsing\DeclarationScopeParsingTests.cs (197)
318
N(SyntaxKind.
GlobalStatement
);
343
N(SyntaxKind.
GlobalStatement
);
372
N(SyntaxKind.
GlobalStatement
);
393
N(SyntaxKind.
GlobalStatement
);
435
N(SyntaxKind.
GlobalStatement
);
464
N(SyntaxKind.
GlobalStatement
);
1879
N(SyntaxKind.
GlobalStatement
);
1901
N(SyntaxKind.
GlobalStatement
);
1959
N(SyntaxKind.
GlobalStatement
);
1994
N(SyntaxKind.
GlobalStatement
);
2046
N(SyntaxKind.
GlobalStatement
);
2069
N(SyntaxKind.
GlobalStatement
);
2114
N(SyntaxKind.
GlobalStatement
);
2132
N(SyntaxKind.
GlobalStatement
);
2221
N(SyntaxKind.
GlobalStatement
);
2247
N(SyntaxKind.
GlobalStatement
);
2277
N(SyntaxKind.
GlobalStatement
);
2327
N(SyntaxKind.
GlobalStatement
);
2353
N(SyntaxKind.
GlobalStatement
);
2383
N(SyntaxKind.
GlobalStatement
);
2433
N(SyntaxKind.
GlobalStatement
);
2455
N(SyntaxKind.
GlobalStatement
);
2481
N(SyntaxKind.
GlobalStatement
);
2525
N(SyntaxKind.
GlobalStatement
);
2580
N(SyntaxKind.
GlobalStatement
);
2602
N(SyntaxKind.
GlobalStatement
);
2643
N(SyntaxKind.
GlobalStatement
);
2665
N(SyntaxKind.
GlobalStatement
);
2712
N(SyntaxKind.
GlobalStatement
);
2751
N(SyntaxKind.
GlobalStatement
);
2803
N(SyntaxKind.
GlobalStatement
);
2826
N(SyntaxKind.
GlobalStatement
);
2871
N(SyntaxKind.
GlobalStatement
);
2889
N(SyntaxKind.
GlobalStatement
);
2943
N(SyntaxKind.
GlobalStatement
);
2984
N(SyntaxKind.
GlobalStatement
);
3002
N(SyntaxKind.
GlobalStatement
);
3131
N(SyntaxKind.
GlobalStatement
);
3153
N(SyntaxKind.
GlobalStatement
);
3323
N(SyntaxKind.
GlobalStatement
);
3511
N(SyntaxKind.
GlobalStatement
);
3578
N(SyntaxKind.
GlobalStatement
);
3674
N(SyntaxKind.
GlobalStatement
);
3694
N(SyntaxKind.
GlobalStatement
);
3717
N(SyntaxKind.
GlobalStatement
);
3779
N(SyntaxKind.
GlobalStatement
);
3799
N(SyntaxKind.
GlobalStatement
);
3822
N(SyntaxKind.
GlobalStatement
);
3859
N(SyntaxKind.
GlobalStatement
);
3962
N(SyntaxKind.
GlobalStatement
);
3982
N(SyntaxKind.
GlobalStatement
);
4010
N(SyntaxKind.
GlobalStatement
);
4075
N(SyntaxKind.
GlobalStatement
);
4095
N(SyntaxKind.
GlobalStatement
);
4119
N(SyntaxKind.
GlobalStatement
);
4156
N(SyntaxKind.
GlobalStatement
);
4249
N(SyntaxKind.
GlobalStatement
);
4265
N(SyntaxKind.
GlobalStatement
);
4288
N(SyntaxKind.
GlobalStatement
);
4325
N(SyntaxKind.
GlobalStatement
);
4422
N(SyntaxKind.
GlobalStatement
);
4438
N(SyntaxKind.
GlobalStatement
);
4465
N(SyntaxKind.
GlobalStatement
);
4502
N(SyntaxKind.
GlobalStatement
);
4600
N(SyntaxKind.
GlobalStatement
);
4616
N(SyntaxKind.
GlobalStatement
);
4644
N(SyntaxKind.
GlobalStatement
);
4681
N(SyntaxKind.
GlobalStatement
);
4752
N(SyntaxKind.
GlobalStatement
);
4827
N(SyntaxKind.
GlobalStatement
);
4903
N(SyntaxKind.
GlobalStatement
);
4978
N(SyntaxKind.
GlobalStatement
);
5049
N(SyntaxKind.
GlobalStatement
);
5120
N(SyntaxKind.
GlobalStatement
);
5195
N(SyntaxKind.
GlobalStatement
);
5271
N(SyntaxKind.
GlobalStatement
);
5338
N(SyntaxKind.
GlobalStatement
);
5431
N(SyntaxKind.
GlobalStatement
);
5447
N(SyntaxKind.
GlobalStatement
);
5474
N(SyntaxKind.
GlobalStatement
);
5533
N(SyntaxKind.
GlobalStatement
);
5549
N(SyntaxKind.
GlobalStatement
);
5576
N(SyntaxKind.
GlobalStatement
);
5626
N(SyntaxKind.
GlobalStatement
);
5660
N(SyntaxKind.
GlobalStatement
);
5713
N(SyntaxKind.
GlobalStatement
);
5783
N(SyntaxKind.
GlobalStatement
);
5836
N(SyntaxKind.
GlobalStatement
);
5915
N(SyntaxKind.
GlobalStatement
);
5986
N(SyntaxKind.
GlobalStatement
);
6081
N(SyntaxKind.
GlobalStatement
);
6115
N(SyntaxKind.
GlobalStatement
);
6149
N(SyntaxKind.
GlobalStatement
);
6186
N(SyntaxKind.
GlobalStatement
);
6238
N(SyntaxKind.
GlobalStatement
);
6307
N(SyntaxKind.
GlobalStatement
);
6376
N(SyntaxKind.
GlobalStatement
);
6440
N(SyntaxKind.
GlobalStatement
);
6519
N(SyntaxKind.
GlobalStatement
);
6550
N(SyntaxKind.
GlobalStatement
);
6573
N(SyntaxKind.
GlobalStatement
);
6617
N(SyntaxKind.
GlobalStatement
);
6648
N(SyntaxKind.
GlobalStatement
);
6667
N(SyntaxKind.
GlobalStatement
);
6692
N(SyntaxKind.
GlobalStatement
);
6758
N(SyntaxKind.
GlobalStatement
);
6819
N(SyntaxKind.
GlobalStatement
);
6889
N(SyntaxKind.
GlobalStatement
);
6951
N(SyntaxKind.
GlobalStatement
);
7034
N(SyntaxKind.
GlobalStatement
);
7070
N(SyntaxKind.
GlobalStatement
);
7089
N(SyntaxKind.
GlobalStatement
);
7114
N(SyntaxKind.
GlobalStatement
);
7170
N(SyntaxKind.
GlobalStatement
);
7230
N(SyntaxKind.
GlobalStatement
);
7291
N(SyntaxKind.
GlobalStatement
);
7351
N(SyntaxKind.
GlobalStatement
);
7407
N(SyntaxKind.
GlobalStatement
);
7463
N(SyntaxKind.
GlobalStatement
);
7523
N(SyntaxKind.
GlobalStatement
);
7584
N(SyntaxKind.
GlobalStatement
);
7636
N(SyntaxKind.
GlobalStatement
);
7702
N(SyntaxKind.
GlobalStatement
);
7774
N(SyntaxKind.
GlobalStatement
);
7845
N(SyntaxKind.
GlobalStatement
);
7920
N(SyntaxKind.
GlobalStatement
);
7990
N(SyntaxKind.
GlobalStatement
);
8058
N(SyntaxKind.
GlobalStatement
);
8130
N(SyntaxKind.
GlobalStatement
);
8197
N(SyntaxKind.
GlobalStatement
);
8258
N(SyntaxKind.
GlobalStatement
);
8314
N(SyntaxKind.
GlobalStatement
);
8367
N(SyntaxKind.
GlobalStatement
);
8416
N(SyntaxKind.
GlobalStatement
);
8436
N(SyntaxKind.
GlobalStatement
);
8515
N(SyntaxKind.
GlobalStatement
);
8535
N(SyntaxKind.
GlobalStatement
);
8578
N(SyntaxKind.
GlobalStatement
);
8598
N(SyntaxKind.
GlobalStatement
);
11465
N(SyntaxKind.
GlobalStatement
);
11568
N(SyntaxKind.
GlobalStatement
);
12023
N(SyntaxKind.
GlobalStatement
);
12041
N(SyntaxKind.
GlobalStatement
);
12078
N(SyntaxKind.
GlobalStatement
);
12097
N(SyntaxKind.
GlobalStatement
);
12137
N(SyntaxKind.
GlobalStatement
);
12181
N(SyntaxKind.
GlobalStatement
);
12204
N(SyntaxKind.
GlobalStatement
);
12238
N(SyntaxKind.
GlobalStatement
);
12258
N(SyntaxKind.
GlobalStatement
);
12282
N(SyntaxKind.
GlobalStatement
);
12323
N(SyntaxKind.
GlobalStatement
);
12368
N(SyntaxKind.
GlobalStatement
);
12392
N(SyntaxKind.
GlobalStatement
);
12420
N(SyntaxKind.
GlobalStatement
);
12464
N(SyntaxKind.
GlobalStatement
);
12510
N(SyntaxKind.
GlobalStatement
);
12552
N(SyntaxKind.
GlobalStatement
);
12611
N(SyntaxKind.
GlobalStatement
);
12643
N(SyntaxKind.
GlobalStatement
);
12678
N(SyntaxKind.
GlobalStatement
);
12710
N(SyntaxKind.
GlobalStatement
);
12735
N(SyntaxKind.
GlobalStatement
);
12801
N(SyntaxKind.
GlobalStatement
);
12838
N(SyntaxKind.
GlobalStatement
);
12879
N(SyntaxKind.
GlobalStatement
);
12912
N(SyntaxKind.
GlobalStatement
);
12937
N(SyntaxKind.
GlobalStatement
);
12993
N(SyntaxKind.
GlobalStatement
);
13021
N(SyntaxKind.
GlobalStatement
);
13046
N(SyntaxKind.
GlobalStatement
);
13106
N(SyntaxKind.
GlobalStatement
);
13138
N(SyntaxKind.
GlobalStatement
);
13163
N(SyntaxKind.
GlobalStatement
);
13224
N(SyntaxKind.
GlobalStatement
);
13257
N(SyntaxKind.
GlobalStatement
);
13282
N(SyntaxKind.
GlobalStatement
);
13328
N(SyntaxKind.
GlobalStatement
);
13378
N(SyntaxKind.
GlobalStatement
);
13429
N(SyntaxKind.
GlobalStatement
);
13479
N(SyntaxKind.
GlobalStatement
);
13525
N(SyntaxKind.
GlobalStatement
);
13579
N(SyntaxKind.
GlobalStatement
);
13625
N(SyntaxKind.
GlobalStatement
);
13675
N(SyntaxKind.
GlobalStatement
);
13726
N(SyntaxKind.
GlobalStatement
);
13768
N(SyntaxKind.
GlobalStatement
);
13824
N(SyntaxKind.
GlobalStatement
);
13859
N(SyntaxKind.
GlobalStatement
);
13894
N(SyntaxKind.
GlobalStatement
);
13926
N(SyntaxKind.
GlobalStatement
);
14974
N(SyntaxKind.
GlobalStatement
);
15021
N(SyntaxKind.
GlobalStatement
);
15068
N(SyntaxKind.
GlobalStatement
);
15125
N(SyntaxKind.
GlobalStatement
);
15202
N(SyntaxKind.
GlobalStatement
);
15289
N(SyntaxKind.
GlobalStatement
);
Parsing\DeconstructionTests.cs (11)
1583
N(SyntaxKind.
GlobalStatement
);
1660
N(SyntaxKind.
GlobalStatement
);
1740
N(SyntaxKind.
GlobalStatement
);
2410
N(SyntaxKind.
GlobalStatement
);
2475
N(SyntaxKind.
GlobalStatement
);
2553
N(SyntaxKind.
GlobalStatement
);
2616
N(SyntaxKind.
GlobalStatement
);
2679
N(SyntaxKind.
GlobalStatement
);
2741
N(SyntaxKind.
GlobalStatement
);
2800
N(SyntaxKind.
GlobalStatement
);
2868
N(SyntaxKind.
GlobalStatement
);
Parsing\ExpressionParsingTests.cs (10)
1383
N(SyntaxKind.
GlobalStatement
);
1465
N(SyntaxKind.
GlobalStatement
);
1533
N(SyntaxKind.
GlobalStatement
);
1561
N(SyntaxKind.
GlobalStatement
);
1619
N(SyntaxKind.
GlobalStatement
);
1647
N(SyntaxKind.
GlobalStatement
);
1699
N(SyntaxKind.
GlobalStatement
);
1727
N(SyntaxKind.
GlobalStatement
);
1775
N(SyntaxKind.
GlobalStatement
);
1807
N(SyntaxKind.
GlobalStatement
);
Parsing\FileModifierParsingTests.cs (22)
150
N(SyntaxKind.
GlobalStatement
);
293
N(SyntaxKind.
GlobalStatement
);
356
N(SyntaxKind.
GlobalStatement
);
419
N(SyntaxKind.
GlobalStatement
);
2052
N(SyntaxKind.
GlobalStatement
);
2105
N(SyntaxKind.
GlobalStatement
);
2147
N(SyntaxKind.
GlobalStatement
);
2181
N(SyntaxKind.
GlobalStatement
);
2231
N(SyntaxKind.
GlobalStatement
);
2296
N(SyntaxKind.
GlobalStatement
);
2359
N(SyntaxKind.
GlobalStatement
);
2422
N(SyntaxKind.
GlobalStatement
);
3034
N(SyntaxKind.
GlobalStatement
);
3095
N(SyntaxKind.
GlobalStatement
);
3157
N(SyntaxKind.
GlobalStatement
);
3197
N(SyntaxKind.
GlobalStatement
);
3239
N(SyntaxKind.
GlobalStatement
);
3257
N(SyntaxKind.
GlobalStatement
);
3303
N(SyntaxKind.
GlobalStatement
);
3377
N(SyntaxKind.
GlobalStatement
);
3435
N(SyntaxKind.
GlobalStatement
);
3456
N(SyntaxKind.
GlobalStatement
);
Parsing\FunctionPointerTests.cs (7)
2356
N(SyntaxKind.
GlobalStatement
);
3359
N(SyntaxKind.
GlobalStatement
);
3433
N(SyntaxKind.
GlobalStatement
);
3512
N(SyntaxKind.
GlobalStatement
);
3585
N(SyntaxKind.
GlobalStatement
);
3885
N(SyntaxKind.
GlobalStatement
);
3973
N(SyntaxKind.
GlobalStatement
);
Parsing\LambdaParameterParsingTests.cs (3)
5413
N(SyntaxKind.
GlobalStatement
);
5452
N(SyntaxKind.
GlobalStatement
);
5460
N(SyntaxKind.
GlobalStatement
);
Parsing\LambdaReturnTypeParsingTests.cs (3)
2696
N(SyntaxKind.
GlobalStatement
);
2757
N(SyntaxKind.
GlobalStatement
);
4946
N(SyntaxKind.
GlobalStatement
);
Parsing\MemberDeclarationParsingTests.cs (3)
2276
N(SyntaxKind.
GlobalStatement
);
2294
N(SyntaxKind.
GlobalStatement
);
8657
N(SyntaxKind.
GlobalStatement
);
Parsing\RecordParsing.cs (12)
125
N(SyntaxKind.
GlobalStatement
);
282
N(SyntaxKind.
GlobalStatement
);
1290
N(SyntaxKind.
GlobalStatement
);
1316
N(SyntaxKind.
GlobalStatement
);
1323
N(SyntaxKind.
GlobalStatement
);
2620
N(SyntaxKind.
GlobalStatement
);
2815
N(SyntaxKind.
GlobalStatement
);
2999
N(SyntaxKind.
GlobalStatement
);
3331
N(SyntaxKind.
GlobalStatement
);
3607
N(SyntaxKind.
GlobalStatement
);
3741
N(SyntaxKind.
GlobalStatement
);
3806
N(SyntaxKind.
GlobalStatement
);
Parsing\ScriptParsingTests.cs (88)
103
N(SyntaxKind.
GlobalStatement
);
157
N(SyntaxKind.
GlobalStatement
);
211
N(SyntaxKind.
GlobalStatement
);
315
N(SyntaxKind.
GlobalStatement
);
348
N(SyntaxKind.
GlobalStatement
);
387
N(SyntaxKind.
GlobalStatement
);
425
N(SyntaxKind.
GlobalStatement
);
1158
N(SyntaxKind.
GlobalStatement
);
1208
N(SyntaxKind.
GlobalStatement
);
1337
N(SyntaxKind.
GlobalStatement
);
1419
N(SyntaxKind.
GlobalStatement
);
1456
N(SyntaxKind.
GlobalStatement
);
2008
N(SyntaxKind.
GlobalStatement
);
2616
N(SyntaxKind.
GlobalStatement
);
2648
N(SyntaxKind.
GlobalStatement
);
2680
N(SyntaxKind.
GlobalStatement
);
4564
N(SyntaxKind.
GlobalStatement
);
4605
N(SyntaxKind.
GlobalStatement
);
4649
N(SyntaxKind.
GlobalStatement
);
4701
N(SyntaxKind.
GlobalStatement
);
4753
N(SyntaxKind.
GlobalStatement
);
4802
N(SyntaxKind.
GlobalStatement
);
4851
N(SyntaxKind.
GlobalStatement
);
4901
N(SyntaxKind.
GlobalStatement
);
4959
N(SyntaxKind.
GlobalStatement
);
5017
N(SyntaxKind.
GlobalStatement
);
5078
N(SyntaxKind.
GlobalStatement
);
5147
N(SyntaxKind.
GlobalStatement
);
5199
N(SyntaxKind.
GlobalStatement
);
5259
N(SyntaxKind.
GlobalStatement
);
5321
N(SyntaxKind.
GlobalStatement
);
5391
N(SyntaxKind.
GlobalStatement
);
5467
N(SyntaxKind.
GlobalStatement
);
5545
N(SyntaxKind.
GlobalStatement
);
5626
N(SyntaxKind.
GlobalStatement
);
5721
N(SyntaxKind.
GlobalStatement
);
5811
N(SyntaxKind.
GlobalStatement
);
5860
N(SyntaxKind.
GlobalStatement
);
5916
N(SyntaxKind.
GlobalStatement
);
5965
N(SyntaxKind.
GlobalStatement
);
6024
N(SyntaxKind.
GlobalStatement
);
6088
N(SyntaxKind.
GlobalStatement
);
6175
N(SyntaxKind.
GlobalStatement
);
6228
N(SyntaxKind.
GlobalStatement
);
6343
N(SyntaxKind.
GlobalStatement
);
6400
N(SyntaxKind.
GlobalStatement
);
6449
N(SyntaxKind.
GlobalStatement
);
6495
N(SyntaxKind.
GlobalStatement
);
6547
N(SyntaxKind.
GlobalStatement
);
6607
N(SyntaxKind.
GlobalStatement
);
6676
N(SyntaxKind.
GlobalStatement
);
6751
N(SyntaxKind.
GlobalStatement
);
6820
N(SyntaxKind.
GlobalStatement
);
6882
N(SyntaxKind.
GlobalStatement
);
6952
N(SyntaxKind.
GlobalStatement
);
7022
N(SyntaxKind.
GlobalStatement
);
7092
N(SyntaxKind.
GlobalStatement
);
7162
N(SyntaxKind.
GlobalStatement
);
7232
N(SyntaxKind.
GlobalStatement
);
7302
N(SyntaxKind.
GlobalStatement
);
7376
N(SyntaxKind.
GlobalStatement
);
7459
N(SyntaxKind.
GlobalStatement
);
7536
N(SyntaxKind.
GlobalStatement
);
7592
N(SyntaxKind.
GlobalStatement
);
7663
N(SyntaxKind.
GlobalStatement
);
7737
N(SyntaxKind.
GlobalStatement
);
7801
N(SyntaxKind.
GlobalStatement
);
7902
N(SyntaxKind.
GlobalStatement
);
7971
N(SyntaxKind.
GlobalStatement
);
8084
N(SyntaxKind.
GlobalStatement
);
8139
N(SyntaxKind.
GlobalStatement
);
8209
N(SyntaxKind.
GlobalStatement
);
8285
N(SyntaxKind.
GlobalStatement
);
8363
N(SyntaxKind.
GlobalStatement
);
8828
N(SyntaxKind.
GlobalStatement
);
8884
N(SyntaxKind.
GlobalStatement
);
8944
N(SyntaxKind.
GlobalStatement
);
9004
N(SyntaxKind.
GlobalStatement
);
9068
N(SyntaxKind.
GlobalStatement
);
9119
N(SyntaxKind.
GlobalStatement
);
9189
N(SyntaxKind.
GlobalStatement
);
9208
N(SyntaxKind.
GlobalStatement
);
9247
N(SyntaxKind.
GlobalStatement
);
9304
N(SyntaxKind.
GlobalStatement
);
9361
N(SyntaxKind.
GlobalStatement
);
9419
N(SyntaxKind.
GlobalStatement
);
9616
Assert.Equal(SyntaxKind.
GlobalStatement
, tree.GetCompilationUnitRoot().ChildNodes().ToList()[0].Kind());
9668
Assert.Equal(SyntaxKind.
GlobalStatement
, statement.Kind());
Parsing\TopLevelStatementsParsingTests.cs (58)
35
N(SyntaxKind.
GlobalStatement
);
67
N(SyntaxKind.
GlobalStatement
);
139
N(SyntaxKind.
GlobalStatement
);
164
N(SyntaxKind.
GlobalStatement
);
189
N(SyntaxKind.
GlobalStatement
);
300
N(SyntaxKind.
GlobalStatement
);
351
N(SyntaxKind.
GlobalStatement
);
415
N(SyntaxKind.
GlobalStatement
);
469
N(SyntaxKind.
GlobalStatement
);
533
N(SyntaxKind.
GlobalStatement
);
623
N(SyntaxKind.
GlobalStatement
);
743
N(SyntaxKind.
GlobalStatement
);
827
N(SyntaxKind.
GlobalStatement
);
903
N(SyntaxKind.
GlobalStatement
);
942
N(SyntaxKind.
GlobalStatement
);
1030
N(SyntaxKind.
GlobalStatement
);
1060
N(SyntaxKind.
GlobalStatement
);
1111
N(SyntaxKind.
GlobalStatement
);
1166
N(SyntaxKind.
GlobalStatement
);
1209
N(SyntaxKind.
GlobalStatement
);
1284
N(SyntaxKind.
GlobalStatement
);
1340
N(SyntaxKind.
GlobalStatement
);
1386
N(SyntaxKind.
GlobalStatement
);
1420
N(SyntaxKind.
GlobalStatement
);
1479
N(SyntaxKind.
GlobalStatement
);
1498
N(SyntaxKind.
GlobalStatement
);
1587
N(SyntaxKind.
GlobalStatement
);
1685
N(SyntaxKind.
GlobalStatement
);
1724
N(SyntaxKind.
GlobalStatement
);
1830
N(SyntaxKind.
GlobalStatement
);
1884
N(SyntaxKind.
GlobalStatement
);
1928
N(SyntaxKind.
GlobalStatement
);
1972
N(SyntaxKind.
GlobalStatement
);
2013
N(SyntaxKind.
GlobalStatement
);
2060
N(SyntaxKind.
GlobalStatement
);
2245
N(SyntaxKind.
GlobalStatement
);
2264
N(SyntaxKind.
GlobalStatement
);
2320
N(SyntaxKind.
GlobalStatement
);
2380
N(SyntaxKind.
GlobalStatement
);
2451
N(SyntaxKind.
GlobalStatement
);
2513
N(SyntaxKind.
GlobalStatement
);
2542
N(SyntaxKind.
GlobalStatement
);
2561
N(SyntaxKind.
GlobalStatement
);
2587
N(SyntaxKind.
GlobalStatement
);
2627
N(SyntaxKind.
GlobalStatement
);
2725
N(SyntaxKind.
GlobalStatement
);
2766
N(SyntaxKind.
GlobalStatement
);
2793
N(SyntaxKind.
GlobalStatement
);
2835
N(SyntaxKind.
GlobalStatement
);
2853
N(SyntaxKind.
GlobalStatement
);
3073
N(SyntaxKind.
GlobalStatement
);
3225
N(SyntaxKind.
GlobalStatement
);
3387
N(SyntaxKind.
GlobalStatement
);
3405
N(SyntaxKind.
GlobalStatement
);
3456
N(SyntaxKind.
GlobalStatement
);
3474
N(SyntaxKind.
GlobalStatement
);
3525
N(SyntaxKind.
GlobalStatement
);
3543
N(SyntaxKind.
GlobalStatement
);
Parsing\UsingDirectiveParsingTests.cs (16)
44
N(SyntaxKind.
GlobalStatement
);
75
N(SyntaxKind.
GlobalStatement
);
114
N(SyntaxKind.
GlobalStatement
);
170
N(SyntaxKind.
GlobalStatement
);
205
N(SyntaxKind.
GlobalStatement
);
259
N(SyntaxKind.
GlobalStatement
);
299
N(SyntaxKind.
GlobalStatement
);
335
N(SyntaxKind.
GlobalStatement
);
417
N(SyntaxKind.
GlobalStatement
);
477
N(SyntaxKind.
GlobalStatement
);
516
N(SyntaxKind.
GlobalStatement
);
575
N(SyntaxKind.
GlobalStatement
);
3486
N(SyntaxKind.
GlobalStatement
);
3543
N(SyntaxKind.
GlobalStatement
);
3596
N(SyntaxKind.
GlobalStatement
);
3643
N(SyntaxKind.
GlobalStatement
);
Syntax\SyntaxTreeTests.cs (4)
1088
N(SyntaxKind.
GlobalStatement
);
1144
N(SyntaxKind.
GlobalStatement
);
1216
N(SyntaxKind.
GlobalStatement
);
1274
N(SyntaxKind.
GlobalStatement
);
Microsoft.CodeAnalysis.CSharp.Workspaces (13)
CodeGeneration\CSharpSyntaxGenerator.cs (3)
2880
if (declaration.Parent.IsKind(SyntaxKind.
GlobalStatement
))
2919
if (declaration.Parent.IsKind(SyntaxKind.
GlobalStatement
))
2988
if (node.Parent.IsKind(SyntaxKind.
GlobalStatement
))
CSharpCodeGenerationService.cs (2)
511
var insertionIndex = compilationUnit.Members.LastIndexOf(memberDeclaration => memberDeclaration.IsKind(SyntaxKind.
GlobalStatement
)) + 1;
515
else if (destinationMember is StatementSyntax statement && statement.IsParentKind(SyntaxKind.
GlobalStatement
))
CSharpDeclarationComparer.cs (1)
148
case SyntaxKind.
GlobalStatement
:
CSharpSyntaxFacts.cs (1)
712
if ((kind != SyntaxKind.
GlobalStatement
) && (kind != SyntaxKind.IncompleteMember) && (node is MemberDeclarationSyntax))
CSharpSyntaxKinds.cs (1)
153
public int? GlobalStatement => (int)SyntaxKind.
GlobalStatement
;
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (1)
533
=> node.IsReturnableConstruct() || (node is CompilationUnitSyntax compilationUnit && compilationUnit.Members.Any(SyntaxKind.
GlobalStatement
));
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
117
return statement != null && !statement.IsParentKind(SyntaxKind.
GlobalStatement
) &&
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1010
conditional.Parent.IsParentKind(SyntaxKind.
GlobalStatement
))
StatementSyntaxExtensions.cs (2)
40
if (first.Parent.IsKind(SyntaxKind.
GlobalStatement
))
41
return second.Parent.IsKind(SyntaxKind.
GlobalStatement
);