562 references to GlobalStatement
Microsoft.CodeAnalysis.CSharp (19)
Binder\LocalBinderFactory.cs (1)
128
if (member.Kind() == SyntaxKind.
GlobalStatement
)
Binder\ScriptLocalScopeBinder.cs (1)
84
if (member.Kind() != SyntaxKind.
GlobalStatement
)
Compilation\CSharpCompilation.cs (1)
788
var lastGlobalStatement = (GlobalStatementSyntax?)root.Members.LastOrDefault(m => m.IsKind(SyntaxKind.
GlobalStatement
));
Compilation\MemberSemanticModel.cs (1)
2176
case SyntaxKind.
GlobalStatement
:
Compilation\SyntaxTreeSemanticModel.cs (5)
937
case SyntaxKind.
GlobalStatement
:
1206
case SyntaxKind.
GlobalStatement
:
1448
case SyntaxKind.
GlobalStatement
:
2415
return (node) => node.Kind() != SyntaxKind.
GlobalStatement
|| node.Parent != unit;
2420
return (node) => node.Parent != unit || node.Kind() == SyntaxKind.
GlobalStatement
;
Declarations\DeclarationTreeBuilder.cs (2)
155
else if (acceptSimpleProgram && member.IsKind(SyntaxKind.
GlobalStatement
))
1243
case SyntaxKind.
GlobalStatement
:
Parser\LanguageParser.cs (2)
772
case SyntaxKind.
GlobalStatement
:
2413
case SyntaxKind.
GlobalStatement
:
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5185
case SyntaxKind.
GlobalStatement
:
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (2)
281
public SyntaxNode ReturnTypeSyntax => CompilationUnit.Members.First(m => m.Kind() == SyntaxKind.
GlobalStatement
);
287
if (member.Kind() == SyntaxKind.
GlobalStatement
&& compilation.IsNullableAnalysisEnabledIn(member))
Syntax\SyntaxFactory.cs (1)
2367
if (!lastNode.IsKind(SyntaxKind.
GlobalStatement
))
Syntax\SyntaxKindFacts.cs (1)
364
case SyntaxKind.
GlobalStatement
:
Syntax\SyntaxNormalizer.cs (1)
1328
if (node.Parent.Kind() is SyntaxKind.
GlobalStatement
or SyntaxKind.FileScopedNamespaceDeclaration)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\StatementSyntaxExtensions.cs (2)
40
if (first.Parent.IsKind(SyntaxKind.
GlobalStatement
))
41
return 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)
721
if ((kind != SyntaxKind.
GlobalStatement
) && (kind != SyntaxKind.IncompleteMember) && (node is TMemberDeclarationSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
165
public int? GlobalStatement => (int)SyntaxKind.
GlobalStatement
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
111
editor.RemoveNode(nextStatement.IsParentKind(SyntaxKind.
GlobalStatement
) ? nextStatement.GetRequiredParent() : nextStatement);
src\Analyzers\CSharp\CodeFixes\RemoveUnreachableCode\CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
85
and not SyntaxKind.
GlobalStatement
)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
509
var insertionIndex = compilationUnit.Members.LastIndexOf(memberDeclaration => memberDeclaration.IsKind(SyntaxKind.
GlobalStatement
)) + 1;
513
else if (destinationMember is StatementSyntax statement && statement.IsParentKind(SyntaxKind.
GlobalStatement
))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
148
case SyntaxKind.
GlobalStatement
:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
120
return statement != null && !statement.IsParentKind(SyntaxKind.
GlobalStatement
) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1010
conditional.Parent.IsParentKind(SyntaxKind.
GlobalStatement
))
Microsoft.CodeAnalysis.CSharp.Features (13)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
282
if (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)
70
if (!memberDeclaration.IsKind(SyntaxKind.
GlobalStatement
) && !memberDeclaration.GetModifiers().Any(SyntaxKind.StaticKeyword))
Debugging\LocationInfoGetter.cs (1)
32
if ((memberDeclaration == null) || (memberDeclaration.Kind() == SyntaxKind.
GlobalStatement
))
EditAndContinue\SyntaxComparer.cs (2)
572
case SyntaxKind.
GlobalStatement
:
1095
case SyntaxKind.
GlobalStatement
:
ExtractMethod\CSharpSelectionResult.cs (1)
208
Contract.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)
65
RemoveNode(editor, node.IsParentKind(SyntaxKind.
GlobalStatement
) ? node.Parent : node, blockFacts);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
111
editor.RemoveNode(nextStatement.IsParentKind(SyntaxKind.
GlobalStatement
) ? nextStatement.GetRequiredParent() : nextStatement);
src\Analyzers\CSharp\CodeFixes\RemoveUnreachableCode\CSharpRemoveUnreachableCodeCodeFixProvider.cs (1)
85
and not SyntaxKind.
GlobalStatement
)
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
100
parent.IsParentKind(SyntaxKind.
GlobalStatement
);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\TopLevelStatementsTests.cs (1)
6431
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 (503)
IncrementalParsing\IncrementalParsingTests.cs (3)
442
SyntaxKind.
GlobalStatement
,
466
SyntaxKind.
GlobalStatement
,
468
SyntaxKind.
GlobalStatement
,
Parsing\CollectionExpressionParsingTests.cs (78)
54
N(SyntaxKind.
GlobalStatement
);
117
N(SyntaxKind.
GlobalStatement
);
178
N(SyntaxKind.
GlobalStatement
);
262
N(SyntaxKind.
GlobalStatement
);
274
N(SyntaxKind.
GlobalStatement
);
286
N(SyntaxKind.
GlobalStatement
);
321
N(SyntaxKind.
GlobalStatement
);
385
N(SyntaxKind.
GlobalStatement
);
448
N(SyntaxKind.
GlobalStatement
);
527
N(SyntaxKind.
GlobalStatement
);
539
N(SyntaxKind.
GlobalStatement
);
551
N(SyntaxKind.
GlobalStatement
);
581
N(SyntaxKind.
GlobalStatement
);
637
N(SyntaxKind.
GlobalStatement
);
700
N(SyntaxKind.
GlobalStatement
);
767
N(SyntaxKind.
GlobalStatement
);
826
N(SyntaxKind.
GlobalStatement
);
889
N(SyntaxKind.
GlobalStatement
);
944
N(SyntaxKind.
GlobalStatement
);
1007
N(SyntaxKind.
GlobalStatement
);
1117
N(SyntaxKind.
GlobalStatement
);
1188
N(SyntaxKind.
GlobalStatement
);
1244
N(SyntaxKind.
GlobalStatement
);
1318
N(SyntaxKind.
GlobalStatement
);
1478
N(SyntaxKind.
GlobalStatement
);
1549
N(SyntaxKind.
GlobalStatement
);
1581
N(SyntaxKind.
GlobalStatement
);
1627
N(SyntaxKind.
GlobalStatement
);
1680
N(SyntaxKind.
GlobalStatement
);
1723
N(SyntaxKind.
GlobalStatement
);
1766
N(SyntaxKind.
GlobalStatement
);
1804
N(SyntaxKind.
GlobalStatement
);
5699
N(SyntaxKind.
GlobalStatement
);
6209
N(SyntaxKind.
GlobalStatement
);
9175
N(SyntaxKind.
GlobalStatement
);
9224
N(SyntaxKind.
GlobalStatement
);
9273
N(SyntaxKind.
GlobalStatement
);
9326
N(SyntaxKind.
GlobalStatement
);
9474
N(SyntaxKind.
GlobalStatement
);
9633
N(SyntaxKind.
GlobalStatement
);
9792
N(SyntaxKind.
GlobalStatement
);
9951
N(SyntaxKind.
GlobalStatement
);
10086
N(SyntaxKind.
GlobalStatement
);
10203
N(SyntaxKind.
GlobalStatement
);
10335
N(SyntaxKind.
GlobalStatement
);
10467
N(SyntaxKind.
GlobalStatement
);
10595
N(SyntaxKind.
GlobalStatement
);
10750
N(SyntaxKind.
GlobalStatement
);
10901
N(SyntaxKind.
GlobalStatement
);
11067
N(SyntaxKind.
GlobalStatement
);
11233
N(SyntaxKind.
GlobalStatement
);
11415
N(SyntaxKind.
GlobalStatement
);
11593
N(SyntaxKind.
GlobalStatement
);
11748
N(SyntaxKind.
GlobalStatement
);
11906
N(SyntaxKind.
GlobalStatement
);
12075
N(SyntaxKind.
GlobalStatement
);
12197
N(SyntaxKind.
GlobalStatement
);
12286
N(SyntaxKind.
GlobalStatement
);
12387
N(SyntaxKind.
GlobalStatement
);
12421
N(SyntaxKind.
GlobalStatement
);
12488
N(SyntaxKind.
GlobalStatement
);
12555
N(SyntaxKind.
GlobalStatement
);
12638
N(SyntaxKind.
GlobalStatement
);
12735
N(SyntaxKind.
GlobalStatement
);
14096
N(SyntaxKind.
GlobalStatement
);
14295
N(SyntaxKind.
GlobalStatement
);
14516
N(SyntaxKind.
GlobalStatement
);
14752
N(SyntaxKind.
GlobalStatement
);
14989
N(SyntaxKind.
GlobalStatement
);
15215
N(SyntaxKind.
GlobalStatement
);
15448
N(SyntaxKind.
GlobalStatement
);
15651
N(SyntaxKind.
GlobalStatement
);
15817
N(SyntaxKind.
GlobalStatement
);
15999
N(SyntaxKind.
GlobalStatement
);
16193
N(SyntaxKind.
GlobalStatement
);
16400
N(SyntaxKind.
GlobalStatement
);
16599
N(SyntaxKind.
GlobalStatement
);
16783
N(SyntaxKind.
GlobalStatement
);
Parsing\DeclarationParsingTests.cs (3)
8304
N(SyntaxKind.
GlobalStatement
);
8616
N(SyntaxKind.
GlobalStatement
);
9487
N(SyntaxKind.
GlobalStatement
);
Parsing\DeclarationScopeParsingTests.cs (178)
318
N(SyntaxKind.
GlobalStatement
);
343
N(SyntaxKind.
GlobalStatement
);
372
N(SyntaxKind.
GlobalStatement
);
393
N(SyntaxKind.
GlobalStatement
);
435
N(SyntaxKind.
GlobalStatement
);
464
N(SyntaxKind.
GlobalStatement
);
1860
N(SyntaxKind.
GlobalStatement
);
1882
N(SyntaxKind.
GlobalStatement
);
1940
N(SyntaxKind.
GlobalStatement
);
1975
N(SyntaxKind.
GlobalStatement
);
2027
N(SyntaxKind.
GlobalStatement
);
2050
N(SyntaxKind.
GlobalStatement
);
2095
N(SyntaxKind.
GlobalStatement
);
2113
N(SyntaxKind.
GlobalStatement
);
2202
N(SyntaxKind.
GlobalStatement
);
2228
N(SyntaxKind.
GlobalStatement
);
2258
N(SyntaxKind.
GlobalStatement
);
2308
N(SyntaxKind.
GlobalStatement
);
2334
N(SyntaxKind.
GlobalStatement
);
2364
N(SyntaxKind.
GlobalStatement
);
2414
N(SyntaxKind.
GlobalStatement
);
2436
N(SyntaxKind.
GlobalStatement
);
2462
N(SyntaxKind.
GlobalStatement
);
2506
N(SyntaxKind.
GlobalStatement
);
2561
N(SyntaxKind.
GlobalStatement
);
2583
N(SyntaxKind.
GlobalStatement
);
2624
N(SyntaxKind.
GlobalStatement
);
2646
N(SyntaxKind.
GlobalStatement
);
2693
N(SyntaxKind.
GlobalStatement
);
2732
N(SyntaxKind.
GlobalStatement
);
2784
N(SyntaxKind.
GlobalStatement
);
2807
N(SyntaxKind.
GlobalStatement
);
2852
N(SyntaxKind.
GlobalStatement
);
2870
N(SyntaxKind.
GlobalStatement
);
2924
N(SyntaxKind.
GlobalStatement
);
2965
N(SyntaxKind.
GlobalStatement
);
2983
N(SyntaxKind.
GlobalStatement
);
3112
N(SyntaxKind.
GlobalStatement
);
3134
N(SyntaxKind.
GlobalStatement
);
3304
N(SyntaxKind.
GlobalStatement
);
3492
N(SyntaxKind.
GlobalStatement
);
3559
N(SyntaxKind.
GlobalStatement
);
3645
N(SyntaxKind.
GlobalStatement
);
3665
N(SyntaxKind.
GlobalStatement
);
3721
N(SyntaxKind.
GlobalStatement
);
3741
N(SyntaxKind.
GlobalStatement
);
3782
N(SyntaxKind.
GlobalStatement
);
3875
N(SyntaxKind.
GlobalStatement
);
3895
N(SyntaxKind.
GlobalStatement
);
3959
N(SyntaxKind.
GlobalStatement
);
3979
N(SyntaxKind.
GlobalStatement
);
4021
N(SyntaxKind.
GlobalStatement
);
4104
N(SyntaxKind.
GlobalStatement
);
4120
N(SyntaxKind.
GlobalStatement
);
4161
N(SyntaxKind.
GlobalStatement
);
4248
N(SyntaxKind.
GlobalStatement
);
4264
N(SyntaxKind.
GlobalStatement
);
4309
N(SyntaxKind.
GlobalStatement
);
4397
N(SyntaxKind.
GlobalStatement
);
4413
N(SyntaxKind.
GlobalStatement
);
4459
N(SyntaxKind.
GlobalStatement
);
4530
N(SyntaxKind.
GlobalStatement
);
4605
N(SyntaxKind.
GlobalStatement
);
4681
N(SyntaxKind.
GlobalStatement
);
4756
N(SyntaxKind.
GlobalStatement
);
4827
N(SyntaxKind.
GlobalStatement
);
4898
N(SyntaxKind.
GlobalStatement
);
4973
N(SyntaxKind.
GlobalStatement
);
5049
N(SyntaxKind.
GlobalStatement
);
5116
N(SyntaxKind.
GlobalStatement
);
5199
N(SyntaxKind.
GlobalStatement
);
5215
N(SyntaxKind.
GlobalStatement
);
5272
N(SyntaxKind.
GlobalStatement
);
5288
N(SyntaxKind.
GlobalStatement
);
5346
N(SyntaxKind.
GlobalStatement
);
5380
N(SyntaxKind.
GlobalStatement
);
5433
N(SyntaxKind.
GlobalStatement
);
5503
N(SyntaxKind.
GlobalStatement
);
5556
N(SyntaxKind.
GlobalStatement
);
5635
N(SyntaxKind.
GlobalStatement
);
5706
N(SyntaxKind.
GlobalStatement
);
5801
N(SyntaxKind.
GlobalStatement
);
5835
N(SyntaxKind.
GlobalStatement
);
5869
N(SyntaxKind.
GlobalStatement
);
5906
N(SyntaxKind.
GlobalStatement
);
5958
N(SyntaxKind.
GlobalStatement
);
6027
N(SyntaxKind.
GlobalStatement
);
6096
N(SyntaxKind.
GlobalStatement
);
6160
N(SyntaxKind.
GlobalStatement
);
6235
N(SyntaxKind.
GlobalStatement
);
6266
N(SyntaxKind.
GlobalStatement
);
6322
N(SyntaxKind.
GlobalStatement
);
6353
N(SyntaxKind.
GlobalStatement
);
6390
N(SyntaxKind.
GlobalStatement
);
6456
N(SyntaxKind.
GlobalStatement
);
6517
N(SyntaxKind.
GlobalStatement
);
6587
N(SyntaxKind.
GlobalStatement
);
6649
N(SyntaxKind.
GlobalStatement
);
6728
N(SyntaxKind.
GlobalStatement
);
6764
N(SyntaxKind.
GlobalStatement
);
6801
N(SyntaxKind.
GlobalStatement
);
6857
N(SyntaxKind.
GlobalStatement
);
6917
N(SyntaxKind.
GlobalStatement
);
6978
N(SyntaxKind.
GlobalStatement
);
7038
N(SyntaxKind.
GlobalStatement
);
7094
N(SyntaxKind.
GlobalStatement
);
7150
N(SyntaxKind.
GlobalStatement
);
7210
N(SyntaxKind.
GlobalStatement
);
7271
N(SyntaxKind.
GlobalStatement
);
7323
N(SyntaxKind.
GlobalStatement
);
7389
N(SyntaxKind.
GlobalStatement
);
7461
N(SyntaxKind.
GlobalStatement
);
7532
N(SyntaxKind.
GlobalStatement
);
7607
N(SyntaxKind.
GlobalStatement
);
7677
N(SyntaxKind.
GlobalStatement
);
7745
N(SyntaxKind.
GlobalStatement
);
7817
N(SyntaxKind.
GlobalStatement
);
7884
N(SyntaxKind.
GlobalStatement
);
7945
N(SyntaxKind.
GlobalStatement
);
8001
N(SyntaxKind.
GlobalStatement
);
8054
N(SyntaxKind.
GlobalStatement
);
8103
N(SyntaxKind.
GlobalStatement
);
8123
N(SyntaxKind.
GlobalStatement
);
8202
N(SyntaxKind.
GlobalStatement
);
8222
N(SyntaxKind.
GlobalStatement
);
8265
N(SyntaxKind.
GlobalStatement
);
8285
N(SyntaxKind.
GlobalStatement
);
11131
N(SyntaxKind.
GlobalStatement
);
11234
N(SyntaxKind.
GlobalStatement
);
11689
N(SyntaxKind.
GlobalStatement
);
11707
N(SyntaxKind.
GlobalStatement
);
11744
N(SyntaxKind.
GlobalStatement
);
11763
N(SyntaxKind.
GlobalStatement
);
11803
N(SyntaxKind.
GlobalStatement
);
11847
N(SyntaxKind.
GlobalStatement
);
11870
N(SyntaxKind.
GlobalStatement
);
11904
N(SyntaxKind.
GlobalStatement
);
11924
N(SyntaxKind.
GlobalStatement
);
11948
N(SyntaxKind.
GlobalStatement
);
11989
N(SyntaxKind.
GlobalStatement
);
12034
N(SyntaxKind.
GlobalStatement
);
12058
N(SyntaxKind.
GlobalStatement
);
12086
N(SyntaxKind.
GlobalStatement
);
12130
N(SyntaxKind.
GlobalStatement
);
12176
N(SyntaxKind.
GlobalStatement
);
12218
N(SyntaxKind.
GlobalStatement
);
12273
N(SyntaxKind.
GlobalStatement
);
12333
N(SyntaxKind.
GlobalStatement
);
12365
N(SyntaxKind.
GlobalStatement
);
12390
N(SyntaxKind.
GlobalStatement
);
12452
N(SyntaxKind.
GlobalStatement
);
12519
N(SyntaxKind.
GlobalStatement
);
12570
N(SyntaxKind.
GlobalStatement
);
12622
N(SyntaxKind.
GlobalStatement
);
12668
N(SyntaxKind.
GlobalStatement
);
12724
N(SyntaxKind.
GlobalStatement
);
12774
N(SyntaxKind.
GlobalStatement
);
12831
N(SyntaxKind.
GlobalStatement
);
12882
N(SyntaxKind.
GlobalStatement
);
12928
N(SyntaxKind.
GlobalStatement
);
12978
N(SyntaxKind.
GlobalStatement
);
13029
N(SyntaxKind.
GlobalStatement
);
13079
N(SyntaxKind.
GlobalStatement
);
13125
N(SyntaxKind.
GlobalStatement
);
13179
N(SyntaxKind.
GlobalStatement
);
13225
N(SyntaxKind.
GlobalStatement
);
13275
N(SyntaxKind.
GlobalStatement
);
13326
N(SyntaxKind.
GlobalStatement
);
13368
N(SyntaxKind.
GlobalStatement
);
13420
N(SyntaxKind.
GlobalStatement
);
13483
N(SyntaxKind.
GlobalStatement
);
13515
N(SyntaxKind.
GlobalStatement
);
14563
N(SyntaxKind.
GlobalStatement
);
14610
N(SyntaxKind.
GlobalStatement
);
14657
N(SyntaxKind.
GlobalStatement
);
14714
N(SyntaxKind.
GlobalStatement
);
14790
N(SyntaxKind.
GlobalStatement
);
14876
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)
5486
N(SyntaxKind.
GlobalStatement
);
5525
N(SyntaxKind.
GlobalStatement
);
5533
N(SyntaxKind.
GlobalStatement
);
Parsing\LambdaReturnTypeParsingTests.cs (3)
2769
N(SyntaxKind.
GlobalStatement
);
2830
N(SyntaxKind.
GlobalStatement
);
5019
N(SyntaxKind.
GlobalStatement
);
Parsing\MemberDeclarationParsingTests.cs (3)
2270
N(SyntaxKind.
GlobalStatement
);
2288
N(SyntaxKind.
GlobalStatement
);
8646
N(SyntaxKind.
GlobalStatement
);
Parsing\ParsingErrorRecoveryTests.cs (6)
135
N(SyntaxKind.
GlobalStatement
);
164
N(SyntaxKind.
GlobalStatement
);
186
N(SyntaxKind.
GlobalStatement
);
207
N(SyntaxKind.
GlobalStatement
);
8054
N(SyntaxKind.
GlobalStatement
);
8094
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
);
2770
N(SyntaxKind.
GlobalStatement
);
2965
N(SyntaxKind.
GlobalStatement
);
3149
N(SyntaxKind.
GlobalStatement
);
3481
N(SyntaxKind.
GlobalStatement
);
3757
N(SyntaxKind.
GlobalStatement
);
3891
N(SyntaxKind.
GlobalStatement
);
3956
N(SyntaxKind.
GlobalStatement
);
Parsing\ScriptParsingTests.cs (87)
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
);
9300
N(SyntaxKind.
GlobalStatement
);
9357
N(SyntaxKind.
GlobalStatement
);
9415
N(SyntaxKind.
GlobalStatement
);
9612
Assert.Equal(SyntaxKind.
GlobalStatement
, tree.GetCompilationUnitRoot().ChildNodes().ToList()[0].Kind());
9664
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
);
1975
N(SyntaxKind.
GlobalStatement
);
2016
N(SyntaxKind.
GlobalStatement
);
2063
N(SyntaxKind.
GlobalStatement
);
2248
N(SyntaxKind.
GlobalStatement
);
2267
N(SyntaxKind.
GlobalStatement
);
2323
N(SyntaxKind.
GlobalStatement
);
2383
N(SyntaxKind.
GlobalStatement
);
2454
N(SyntaxKind.
GlobalStatement
);
2516
N(SyntaxKind.
GlobalStatement
);
2545
N(SyntaxKind.
GlobalStatement
);
2564
N(SyntaxKind.
GlobalStatement
);
2590
N(SyntaxKind.
GlobalStatement
);
2630
N(SyntaxKind.
GlobalStatement
);
2728
N(SyntaxKind.
GlobalStatement
);
2769
N(SyntaxKind.
GlobalStatement
);
2796
N(SyntaxKind.
GlobalStatement
);
2838
N(SyntaxKind.
GlobalStatement
);
2856
N(SyntaxKind.
GlobalStatement
);
3076
N(SyntaxKind.
GlobalStatement
);
3228
N(SyntaxKind.
GlobalStatement
);
3390
N(SyntaxKind.
GlobalStatement
);
3408
N(SyntaxKind.
GlobalStatement
);
3459
N(SyntaxKind.
GlobalStatement
);
3477
N(SyntaxKind.
GlobalStatement
);
3521
N(SyntaxKind.
GlobalStatement
);
3579
M(SyntaxKind.
GlobalStatement
);
Parsing\UsingDirectiveParsingTests.cs (15)
44
N(SyntaxKind.
GlobalStatement
);
75
N(SyntaxKind.
GlobalStatement
);
114
N(SyntaxKind.
GlobalStatement
);
170
N(SyntaxKind.
GlobalStatement
);
205
N(SyntaxKind.
GlobalStatement
);
256
N(SyntaxKind.
GlobalStatement
);
325
N(SyntaxKind.
GlobalStatement
);
407
N(SyntaxKind.
GlobalStatement
);
467
N(SyntaxKind.
GlobalStatement
);
506
N(SyntaxKind.
GlobalStatement
);
565
N(SyntaxKind.
GlobalStatement
);
3436
N(SyntaxKind.
GlobalStatement
);
3493
N(SyntaxKind.
GlobalStatement
);
3546
N(SyntaxKind.
GlobalStatement
);
3593
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
))
2990
if (node.Parent.IsKind(SyntaxKind.
GlobalStatement
))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\StatementSyntaxExtensions.cs (2)
40
if (first.Parent.IsKind(SyntaxKind.
GlobalStatement
))
41
return 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)
721
if ((kind != SyntaxKind.
GlobalStatement
) && (kind != SyntaxKind.IncompleteMember) && (node is TMemberDeclarationSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
165
public int? GlobalStatement => (int)SyntaxKind.
GlobalStatement
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
509
var insertionIndex = compilationUnit.Members.LastIndexOf(memberDeclaration => memberDeclaration.IsKind(SyntaxKind.
GlobalStatement
)) + 1;
513
else if (destinationMember is StatementSyntax statement && statement.IsParentKind(SyntaxKind.
GlobalStatement
))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
148
case SyntaxKind.
GlobalStatement
:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
120
return statement != null && !statement.IsParentKind(SyntaxKind.
GlobalStatement
) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1010
conditional.Parent.IsParentKind(SyntaxKind.
GlobalStatement
))