1 instantiation of GotoStatementSyntax
Microsoft.CodeAnalysis.CSharp (1)
Syntax.xml.Internal.Generated.cs (1)
11449internal override SyntaxNode CreateRed(SyntaxNode? parent, int position) => new CSharp.Syntax.GotoStatementSyntax(this, parent, position);
58 references to GotoStatementSyntax
Microsoft.CodeAnalysis.CSharp (27)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
135case GotoStatementSyntax { RawKind: (int)SyntaxKind.GotoStatement }:
Binder\Binder_Statements.cs (2)
112result = BindGoto((GotoStatementSyntax)node, diagnostics); 510private BoundStatement BindGoto(GotoStatementSyntax node, BindingDiagnosticBag diagnostics)
Binder\ExpressionVariableFinder.cs (1)
97public override void VisitGotoStatement(GotoStatementSyntax node)
Binder\SwitchBinder.cs (1)
487internal BoundStatement BindGotoCaseOrDefault(GotoStatementSyntax node, Binder gotoBinder, BindingDiagnosticBag diagnostics)
Compiler\MethodCompiler.cs (1)
2197case GotoStatementSyntax { RawKind: (int)SyntaxKind.GotoStatement }:
Symbols\Source\SourceLocalSymbol.cs (1)
873_nodeBinder.BindStatement((GotoStatementSyntax)_nodeToBind, BindingDiagnosticBag.Discarded);
Syntax.xml.Main.Generated.cs (7)
382public virtual TResult? VisitGotoStatement(GotoStatementSyntax node) => this.DefaultVisit(node); 1129public virtual void VisitGotoStatement(GotoStatementSyntax node) => this.DefaultVisit(node); 1875public override SyntaxNode? VisitGotoStatement(GotoStatementSyntax node) 4173public static GotoStatementSyntax GotoStatement(SyntaxKind kind, SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken) 4191return (GotoStatementSyntax)Syntax.InternalSyntax.SyntaxFactory.GotoStatement(kind, attributeLists.Node.ToGreenList<Syntax.InternalSyntax.AttributeListSyntax>(), (Syntax.InternalSyntax.SyntaxToken)gotoKeyword.Node!, (Syntax.InternalSyntax.SyntaxToken?)caseOrDefaultKeyword.Node, expression == null ? null : (Syntax.InternalSyntax.ExpressionSyntax)expression.Green, (Syntax.InternalSyntax.SyntaxToken)semicolonToken.Node!).CreateRed(); 4195public static GotoStatementSyntax GotoStatement(SyntaxKind kind, SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax? expression) 4200public static GotoStatementSyntax GotoStatement(SyntaxKind kind, ExpressionSyntax? expression = default)
Syntax.xml.Syntax.Generated.cs (8)
7133public GotoStatementSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken) 7137var newNode = SyntaxFactory.GotoStatement(this.Kind(), attributeLists, gotoKeyword, caseOrDefaultKeyword, expression, semicolonToken); 7146public new GotoStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, this.Expression, this.SemicolonToken); 7147public GotoStatementSyntax WithGotoKeyword(SyntaxToken gotoKeyword) => Update(this.AttributeLists, gotoKeyword, this.CaseOrDefaultKeyword, this.Expression, this.SemicolonToken); 7148public GotoStatementSyntax WithCaseOrDefaultKeyword(SyntaxToken caseOrDefaultKeyword) => Update(this.AttributeLists, this.GotoKeyword, caseOrDefaultKeyword, this.Expression, this.SemicolonToken); 7149public GotoStatementSyntax WithExpression(ExpressionSyntax? expression) => Update(this.AttributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, expression, this.SemicolonToken); 7150public GotoStatementSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, this.Expression, semicolonToken); 7153public new GotoStatementSyntax AddAttributeLists(params AttributeListSyntax[] items) => WithAttributeLists(this.AttributeLists.AddRange(items));
Syntax\GotoStatementSyntax.cs (3)
11public GotoStatementSyntax Update(SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken) 20public static GotoStatementSyntax GotoStatement(SyntaxKind kind, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax expression) 23public static GotoStatementSyntax GotoStatement(SyntaxKind kind, SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken)
Syntax\LookupPosition.cs (2)
341return ((GotoStatementSyntax)statement).GotoKeyword; 404return ((GotoStatementSyntax)statement).SemicolonToken;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
2142var gotoStatement = token.GetAncestor<GotoStatementSyntax>();
Microsoft.CodeAnalysis.CSharp.Features (3)
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (2)
76if (node.FirstAncestorOrSelf<GotoStatementSyntax>() is not GotoStatementSyntax gotoStatement)
Highlighting\KeywordHighlighters\SwitchStatementHighlighter.cs (1)
67else if (highlightGotos && node is GotoStatementSyntax gotoStatement)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (4)
IOperation\IOperationTests_IBranchOperation.Extensions.cs (1)
31var result = GetOuterOperationAndCorrespondingInnerOperation<LabeledStatementSyntax, GotoStatementSyntax>(@"
IOperation\IOperationTests_InvalidStatement.cs (3)
359VerifyOperationTreeAndDiagnosticsForTest<GotoStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 415VerifyOperationTreeAndDiagnosticsForTest<GotoStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 444VerifyOperationTreeAndDiagnosticsForTest<GotoStatementSyntax>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ScriptSemanticsTests.cs (1)
525var symbol1 = model.GetSymbolInfo(((GotoStatementSyntax)statements[1]).Expression).Symbol;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\SemanticModelAPITests.cs (2)
334var statement = tree.GetCompilationUnitRoot().DescendantNodes().OfType<GotoStatementSyntax>().First();
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
3710var gotoStatement = (GotoStatementSyntax)methodDecl.Body.Statements[1];
DocumentationComments\DocumentationCommentIDTests.cs (1)
144var syntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<GotoStatementSyntax>().Single().Expression;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Generated\Syntax.Test.xml.Generated.cs (5)
10766private static GotoStatementSyntax GenerateGotoStatement() 12583var node = GenerateGotoStatement(); 12590var newNode = node.WithAttributeLists(node.AttributeLists).WithGotoKeyword(node.GotoKeyword).WithCaseOrDefaultKeyword(node.CaseOrDefaultKeyword).WithExpression(node.Expression).WithSemicolonToken(node.SemicolonToken); 17489var oldNode = GenerateGotoStatement(); 17505var oldNode = GenerateGotoStatement();
Parsing\StatementParsingTests.cs (6)
1035var gs = (GotoStatementSyntax)statement; 1057var gs = (GotoStatementSyntax)statement; 1081var gs = (GotoStatementSyntax)statement;
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
2142var gotoStatement = token.GetAncestor<GotoStatementSyntax>();
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
487if (token.Parent is DefaultSwitchLabelSyntax or GotoStatementSyntax)
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
2142var gotoStatement = token.GetAncestor<GotoStatementSyntax>();