1 instantiation of GotoStatementSyntax
Microsoft.CodeAnalysis.CSharp (1)
Syntax.xml.Internal.Generated.cs (1)
11372internal 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)
472internal BoundStatement BindGotoCaseOrDefault(GotoStatementSyntax node, Binder gotoBinder, BindingDiagnosticBag diagnostics)
Compiler\MethodCompiler.cs (1)
2181case GotoStatementSyntax { RawKind: (int)SyntaxKind.GotoStatement }:
Symbols\Source\SourceLocalSymbol.cs (1)
803_nodeBinder.BindStatement((GotoStatementSyntax)_nodeToBind, diagnostics);
Syntax.xml.Main.Generated.cs (7)
379public virtual TResult? VisitGotoStatement(GotoStatementSyntax node) => this.DefaultVisit(node); 1123public virtual void VisitGotoStatement(GotoStatementSyntax node) => this.DefaultVisit(node); 1866public override SyntaxNode? VisitGotoStatement(GotoStatementSyntax node) 4152public static GotoStatementSyntax GotoStatement(SyntaxKind kind, SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken) 4170return (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(); 4174public static GotoStatementSyntax GotoStatement(SyntaxKind kind, SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax? expression) 4179public static GotoStatementSyntax GotoStatement(SyntaxKind kind, ExpressionSyntax? expression = default)
Syntax.xml.Syntax.Generated.cs (8)
7088public GotoStatementSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken) 7092var newNode = SyntaxFactory.GotoStatement(this.Kind(), attributeLists, gotoKeyword, caseOrDefaultKeyword, expression, semicolonToken); 7101public new GotoStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, this.Expression, this.SemicolonToken); 7102public GotoStatementSyntax WithGotoKeyword(SyntaxToken gotoKeyword) => Update(this.AttributeLists, gotoKeyword, this.CaseOrDefaultKeyword, this.Expression, this.SemicolonToken); 7103public GotoStatementSyntax WithCaseOrDefaultKeyword(SyntaxToken caseOrDefaultKeyword) => Update(this.AttributeLists, this.GotoKeyword, caseOrDefaultKeyword, this.Expression, this.SemicolonToken); 7104public GotoStatementSyntax WithExpression(ExpressionSyntax? expression) => Update(this.AttributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, expression, this.SemicolonToken); 7105public GotoStatementSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, this.Expression, semicolonToken); 7108public 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)
10723private static GotoStatementSyntax GenerateGotoStatement() 12529var node = GenerateGotoStatement(); 12536var newNode = node.WithAttributeLists(node.AttributeLists).WithGotoKeyword(node.GotoKeyword).WithCaseOrDefaultKeyword(node.CaseOrDefaultKeyword).WithExpression(node.Expression).WithSemicolonToken(node.SemicolonToken); 17409var oldNode = GenerateGotoStatement(); 17425var 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>();