76 references to ReturnKeyword
Microsoft.CodeAnalysis.CSharp (9)
Parser\LanguageParser.cs (7)
7410case SyntaxKind.ReturnKeyword: 7563this.PeekToken(1).Kind is SyntaxKind.ReturnKeyword or SyntaxKind.BreakKeyword; 8220case SyntaxKind.ReturnKeyword: 9019Debug.Assert(this.CurrentToken.Kind == SyntaxKind.ReturnKeyword); 9022this.EatToken(SyntaxKind.ReturnKeyword), 9044returnOrBreak = this.EatToken(SyntaxKind.ReturnKeyword); 10007case SyntaxKind.ReturnKeyword:
Syntax\SyntaxKindFacts.cs (2)
901return SyntaxKind.ReturnKeyword; 1539case SyntaxKind.ReturnKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
SyntaxTokenExtensions.cs (1)
161case SyntaxKind.ReturnKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
74Token(leadingTrivia, SyntaxKind.ReturnKeyword, trailing: default),
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
2613if (token.IsKind(SyntaxKind.ReturnKeyword))
MethodGenerator.cs (1)
200attributes.AddRange(AttributeGenerator.GenerateAttributeLists(method.GetReturnTypeAttributes(), info, SyntaxFactory.Token(SyntaxKind.ReturnKeyword)));
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
150case SyntaxKind.ReturnKeyword:
Completion\KeywordRecommenders\ReturnKeywordRecommender.cs (1)
15: base(SyntaxKind.ReturnKeyword)
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
74Token(leadingTrivia, SyntaxKind.ReturnKeyword, trailing: default),
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
52case SyntaxKind.ReturnKeyword:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\LocalFunctionTests.cs (1)
810Assert.Equal(SyntaxKind.ReturnKeyword, attributeList.Target.Identifier.Kind());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (51)
Generated\Syntax.Test.xml.Generated.cs (8)
371=> InternalSyntaxFactory.ReturnStatement(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), InternalSyntaxFactory.Token(SyntaxKind.ReturnKeyword), null, InternalSyntaxFactory.Token(SyntaxKind.SemicolonToken)); 377=> InternalSyntaxFactory.YieldStatement(SyntaxKind.YieldReturnStatement, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), InternalSyntaxFactory.Token(SyntaxKind.YieldKeyword), InternalSyntaxFactory.Token(SyntaxKind.ReturnKeyword), null, InternalSyntaxFactory.Token(SyntaxKind.SemicolonToken)); 2150Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnKeyword.Kind); 2177Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnOrBreakKeyword.Kind); 10347=> SyntaxFactory.ReturnStatement(new SyntaxList<AttributeListSyntax>(), SyntaxFactory.Token(SyntaxKind.ReturnKeyword), default(ExpressionSyntax), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 10353=> SyntaxFactory.YieldStatement(SyntaxKind.YieldReturnStatement, new SyntaxList<AttributeListSyntax>(), SyntaxFactory.Token(SyntaxKind.YieldKeyword), SyntaxFactory.Token(SyntaxKind.ReturnKeyword), default(ExpressionSyntax), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 12126Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnKeyword.Kind()); 12153Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnOrBreakKeyword.Kind());
Parsing\DeclarationParsingTests.cs (2)
6304N(SyntaxKind.ReturnKeyword); 8342N(SyntaxKind.ReturnKeyword);
Parsing\LambdaAttributeParsingTests.cs (2)
669N(SyntaxKind.ReturnKeyword); 2470N(SyntaxKind.ReturnKeyword);
Parsing\LambdaParameterParsingTests.cs (7)
2315N(SyntaxKind.ReturnKeyword); 2728N(SyntaxKind.ReturnKeyword); 2843N(SyntaxKind.ReturnKeyword); 3169N(SyntaxKind.ReturnKeyword); 3290N(SyntaxKind.ReturnKeyword); 3463N(SyntaxKind.ReturnKeyword); 3923N(SyntaxKind.ReturnKeyword);
Parsing\LambdaReturnTypeParsingTests.cs (3)
108N(SyntaxKind.ReturnKeyword); 2989N(SyntaxKind.ReturnKeyword); 3029N(SyntaxKind.ReturnKeyword);
Parsing\LocalFunctionParsingTests.cs (1)
433N(SyntaxKind.ReturnKeyword);
Parsing\MemberDeclarationParsingTests.cs (1)
8154N(SyntaxKind.ReturnKeyword);
Parsing\ParsingErrorRecoveryTests.cs (1)
5776Assert.Equal(SyntaxKind.ReturnKeyword, getBodyStmts[0].GetFirstToken().Kind());
Parsing\StatementAttributeParsingTests.cs (7)
548N(SyntaxKind.ReturnKeyword); 684N(SyntaxKind.ReturnKeyword); 758N(SyntaxKind.ReturnKeyword); 2378N(SyntaxKind.ReturnKeyword); 2491N(SyntaxKind.ReturnKeyword); 2606N(SyntaxKind.ReturnKeyword); 3233N(SyntaxKind.ReturnKeyword);
Parsing\StatementParsingTests.cs (3)
1107Assert.Equal(SyntaxKind.ReturnKeyword, rs.ReturnKeyword.Kind()); 1127Assert.Equal(SyntaxKind.ReturnKeyword, rs.ReturnKeyword.Kind()); 1151Assert.Equal(SyntaxKind.ReturnKeyword, ys.ReturnOrBreakKeyword.Kind());
Parsing\SwitchExpressionParsingTests.cs (1)
378N(SyntaxKind.ReturnKeyword);
Parsing\TopLevelStatementsParsingTests.cs (3)
764N(SyntaxKind.ReturnKeyword); 1304N(SyntaxKind.ReturnKeyword); 1438N(SyntaxKind.ReturnKeyword);
Parsing\ValueTupleTests.cs (6)
76N(SyntaxKind.ReturnKeyword); 734N(SyntaxKind.ReturnKeyword); 795N(SyntaxKind.ReturnKeyword); 856N(SyntaxKind.ReturnKeyword); 909N(SyntaxKind.ReturnKeyword); 973N(SyntaxKind.ReturnKeyword);
Syntax\SyntaxNodeTests.cs (6)
237Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[0].Kind()); 250Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[6].Kind()); 258Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[0].Kind()); 273Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[1].Kind()); 287Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[7].Kind()); 296Assert.Equal(SyntaxKind.ReturnKeyword, nodesAndTokens[1].Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Classification\ClassificationHelpers.cs (1)
89case SyntaxKind.ReturnKeyword:
CodeGeneration\CSharpSyntaxGenerator.cs (2)
1016=> list.Target?.Identifier.IsKind(SyntaxKind.ReturnKeyword) ?? false; 1080.Select(list => list.WithTarget(SyntaxFactory.AttributeTargetSpecifier(SyntaxFactory.Token(SyntaxKind.ReturnKeyword))));
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
161case SyntaxKind.ReturnKeyword:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
2613if (token.IsKind(SyntaxKind.ReturnKeyword))
MethodGenerator.cs (1)
200attributes.AddRange(AttributeGenerator.GenerateAttributeLists(method.GetReturnTypeAttributes(), info, SyntaxFactory.Token(SyntaxKind.ReturnKeyword)));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
430case SyntaxKind.ReturnKeyword when token.Parent.IsKind(SyntaxKind.YieldReturnStatement):