47 references to Statement
Microsoft.CodeAnalysis.CSharp (16)
Binder\Binder_Statements.cs (1)
3706var boundStatement = BindStatement(topLevelStatement.Statement, diagnostics);
Binder\LocalBinderFactory.cs (1)
527Visit(node.Statement);
Binder\ScriptLocalScopeBinder.cs (1)
88LocalScopeBinder.BuildLabels(scriptInitializer, ((GlobalStatementSyntax)member).Statement, ref builder);
Binder\SimpleProgramBinder.cs (3)
34this.BuildLocals(this, topLevelStatement.Statement, locals); 49this.BuildLocalFunctions(topLevelStatement.Statement, ref locals); 72BuildLabels(_entryPoint, topLevelStatement.Statement, ref labels);
Compilation\CSharpCompilation.cs (1)
832var statement = lastGlobalStatement.Statement;
Compilation\CSharpSemanticModel.cs (1)
2416BoundStatement bound = binder.BindStatement(globalStatement.Statement, diagnostics);
Declarations\DeclarationTreeBuilder.cs (2)
160var topLevelStatement = global.Statement; 196bag.Add(ErrorCode.ERR_SimpleProgramIsEmpty, ((EmptyStatementSyntax)firstGlobalStatement.Statement).SemicolonToken.GetLocation());
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5780var globalStatement = ((GlobalStatementSyntax)m).Statement;
Syntax.xml.Main.Generated.cs (1)
1828=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), (StatementSyntax?)Visit(node.Statement) ?? throw new ArgumentNullException("statement"));
Syntax.xml.Syntax.Generated.cs (3)
6203if (attributeLists != this.AttributeLists || modifiers != this.Modifiers || statement != this.Statement) 6214public new GlobalStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.Statement); 6216public new GlobalStatementSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.Statement);
Syntax\SyntaxFactory.cs (1)
2389!globalStatement.Statement.IsKind(SyntaxKind.ExpressionStatement) ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (1)
43builder.Add(currentGlobalStatement.Statement);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpBlockFacts.cs (1)
42CompilationUnitSyntax compilationUnit => compilationUnit.Members.OfType<GlobalStatementSyntax>().SelectAsArray(globalStatement => globalStatement.Statement),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
243=> ((GlobalStatementSyntax)node).Statement;
Microsoft.CodeAnalysis.CSharp.Features (10)
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
131var statement = globalStatement.Statement.WithAdditionalAnnotations(Formatter.Annotation);
EditAndContinue\DeclarationBody\TopLevelCodeDeclarationBody.cs (2)
32=> model.AnalyzeDataFlow(((GlobalStatementSyntax)unit.Members[0]).Statement, GlobalStatements.Last().Statement)!.CapturedInside;
ExtractMethod\CSharpMethodExtractor.cs (4)
104if (!globalStatement.Statement.IsStatementContainerNode() && !root.SyntaxTree.IsScript()) 110return globalStatement.Statement; 142if (!globalStatement.Statement.IsStatementContainerNode() && !root.SyntaxTree.IsScript()) 148return globalStatement.Statement;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
349return node.WithStatement(ReplaceStatementIfNeeded(node.Statement));
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.MultipleStatementsCodeGenerator.cs (1)
75GlobalStatementSyntax globalStatement => ((CompilationUnitSyntax)globalStatement.Parent).Members.OfType<GlobalStatementSyntax>().Select(globalStatement => globalStatement.Statement),
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (1)
43builder.Add(currentGlobalStatement.Statement);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\ScriptSemanticsTests.cs (3)
494Statement as ExpressionStatementSyntax). 522var statements = root.ChildNodes().Select(n => ((GlobalStatementSyntax)n).Statement).ToArray(); 1391var node3 = (ExpressionStatementSyntax)node2.Statement;
Semantics\TopLevelStatementsTests.cs (2)
6515Assert.False(mm.TestOnlyTryGetBoundNodesFromMap(globalStatement.Statement).IsEmpty); 6517Assert.Same(mm, syntaxTreeModel.GetMemberModel(globalStatement.Statement));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\GetSemanticInfoTests.cs (1)
1138var expr = ((ExpressionStatementSyntax)stmt.Statement).Expression;
Symbols\ExtensionMethodTests.cs (1)
2431var expr = ((ExpressionStatementSyntax)((GlobalStatementSyntax)tree.GetCompilationUnitRoot().Members[0]).Statement).Expression;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (2)
12372Assert.NotNull(node.Statement); 12373var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithStatement(node.Statement);
IncrementalParsing\BinaryExpression.cs (1)
219var statement = statementType.Statement as ExpressionStatementSyntax;
IncrementalParsing\CompoundAssignment.cs (1)
159var statement = statementType.Statement as ExpressionStatementSyntax;
IncrementalParsing\UnaryExpression.cs (1)
102var statement = statementType.Statement as ExpressionStatementSyntax;
Parsing\ParsingErrorRecoveryTests.cs (1)
7303var expressionStatement = (ExpressionStatementSyntax)globalStatement.Statement;
Syntax\SyntaxNodeTests.cs (1)
3331var method = (LocalFunctionStatementSyntax)((GlobalStatementSyntax)root.Members[0]).Statement;
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpBlockFacts.cs (1)
42CompilationUnitSyntax compilationUnit => compilationUnit.Members.OfType<GlobalStatementSyntax>().SelectAsArray(globalStatement => globalStatement.Statement),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
243=> ((GlobalStatementSyntax)node).Statement;
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpBlockFacts.cs (1)
42CompilationUnitSyntax compilationUnit => compilationUnit.Members.OfType<GlobalStatementSyntax>().SelectAsArray(globalStatement => globalStatement.Statement),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
243=> ((GlobalStatementSyntax)node).Statement;