93 references to ReturnKeyword
Microsoft.CodeAnalysis.CSharp (10)
Parser\LanguageParser.cs (7)
7992case SyntaxKind.ReturnKeyword: 8150this.PeekToken(1).Kind is SyntaxKind.ReturnKeyword or SyntaxKind.BreakKeyword; 8808case SyntaxKind.ReturnKeyword: 9644Debug.Assert(this.CurrentToken.Kind == SyntaxKind.ReturnKeyword); 9647this.EatToken(SyntaxKind.ReturnKeyword), 9669returnOrBreak = this.EatToken(SyntaxKind.ReturnKeyword); 10664case SyntaxKind.ReturnKeyword:
Syntax\SyntaxKindFacts.cs (3)
56case SyntaxKind.ReturnKeyword: 929return SyntaxKind.ReturnKeyword; 1575case SyntaxKind.ReturnKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
78public static readonly SyntaxToken ReturnKeyword = Token(SyntaxKind.ReturnKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
209case SyntaxKind.ReturnKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
75Token(leadingTrivia, SyntaxKind.ReturnKeyword, trailing: default),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2599if (token.IsKind(SyntaxKind.ReturnKeyword))
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
180case SyntaxKind.ReturnKeyword:
Completion\KeywordRecommenders\ReturnKeywordRecommender.cs (1)
16: base(SyntaxKind.ReturnKeyword)
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
54case SyntaxKind.ReturnKeyword:
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
75Token(leadingTrivia, SyntaxKind.ReturnKeyword, trailing: default),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\LocalFunctionTests.cs (1)
810Assert.Equal(SyntaxKind.ReturnKeyword, attributeList.Target.Identifier.Kind());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (66)
Generated\Syntax.Test.xml.Generated.cs (8)
383=> InternalSyntaxFactory.ReturnStatement(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), InternalSyntaxFactory.Token(SyntaxKind.ReturnKeyword), null, InternalSyntaxFactory.Token(SyntaxKind.SemicolonToken)); 389=> 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)); 2211Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnKeyword.Kind); 2238Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnOrBreakKeyword.Kind); 10599=> SyntaxFactory.ReturnStatement(new SyntaxList<AttributeListSyntax>(), SyntaxFactory.Token(SyntaxKind.ReturnKeyword), default(ExpressionSyntax), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 10605=> SyntaxFactory.YieldStatement(SyntaxKind.YieldReturnStatement, new SyntaxList<AttributeListSyntax>(), SyntaxFactory.Token(SyntaxKind.YieldKeyword), SyntaxFactory.Token(SyntaxKind.ReturnKeyword), default(ExpressionSyntax), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 12427Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnKeyword.Kind()); 12454Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnOrBreakKeyword.Kind());
Parsing\CollectionExpressionParsingTests.cs (4)
278N(SyntaxKind.ReturnKeyword); 330N(SyntaxKind.ReturnKeyword); 543N(SyntaxKind.ReturnKeyword); 590N(SyntaxKind.ReturnKeyword);
Parsing\DeclarationParsingTests.cs (2)
6304N(SyntaxKind.ReturnKeyword); 8247N(SyntaxKind.ReturnKeyword);
Parsing\FieldKeywordParsingTests.cs (3)
243N(SyntaxKind.ReturnKeyword); 498N(SyntaxKind.ReturnKeyword); 2180N(SyntaxKind.ReturnKeyword);
Parsing\LambdaAttributeParsingTests.cs (3)
654N(SyntaxKind.ReturnKeyword); 2412N(SyntaxKind.ReturnKeyword); 2482N(SyntaxKind.ReturnKeyword);
Parsing\LambdaParameterParsingTests.cs (7)
2403N(SyntaxKind.ReturnKeyword); 2816N(SyntaxKind.ReturnKeyword); 2931N(SyntaxKind.ReturnKeyword); 3257N(SyntaxKind.ReturnKeyword); 3378N(SyntaxKind.ReturnKeyword); 3551N(SyntaxKind.ReturnKeyword); 4011N(SyntaxKind.ReturnKeyword);
Parsing\LambdaReturnTypeParsingTests.cs (3)
108N(SyntaxKind.ReturnKeyword); 3062N(SyntaxKind.ReturnKeyword); 3102N(SyntaxKind.ReturnKeyword);
Parsing\LocalFunctionParsingTests.cs (2)
433N(SyntaxKind.ReturnKeyword); 2785N(SyntaxKind.ReturnKeyword);
Parsing\MemberDeclarationParsingTests.cs (2)
8144N(SyntaxKind.ReturnKeyword); 12532N(SyntaxKind.ReturnKeyword);
Parsing\ParsingErrorRecoveryTests.cs (4)
5531N(SyntaxKind.ReturnKeyword); 5644N(SyntaxKind.ReturnKeyword); 5772N(SyntaxKind.ReturnKeyword); 6580Assert.Equal(SyntaxKind.ReturnKeyword, getBodyStmts[0].GetFirstToken().Kind());
Parsing\StatementAttributeParsingTests.cs (7)
549N(SyntaxKind.ReturnKeyword); 685N(SyntaxKind.ReturnKeyword); 759N(SyntaxKind.ReturnKeyword); 2379N(SyntaxKind.ReturnKeyword); 2492N(SyntaxKind.ReturnKeyword); 2607N(SyntaxKind.ReturnKeyword); 3234N(SyntaxKind.ReturnKeyword);
Parsing\StatementParsingTests.cs (4)
1107Assert.Equal(SyntaxKind.ReturnKeyword, rs.ReturnKeyword.Kind()); 1127Assert.Equal(SyntaxKind.ReturnKeyword, rs.ReturnKeyword.Kind()); 1151Assert.Equal(SyntaxKind.ReturnKeyword, ys.ReturnOrBreakKeyword.Kind()); 5893N(SyntaxKind.ReturnKeyword);
Parsing\SwitchExpressionParsingTests.cs (1)
379N(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());
Syntax\SyntaxTests.cs (1)
270case SyntaxKind.ReturnKeyword:
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Classification\ClassificationHelpers.cs (1)
84case SyntaxKind.ReturnKeyword:
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1026=> list.Target?.Identifier.IsKind(SyntaxKind.ReturnKeyword) ?? false;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
78public static readonly SyntaxToken ReturnKeyword = Token(SyntaxKind.ReturnKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
209case SyntaxKind.ReturnKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2599if (token.IsKind(SyntaxKind.ReturnKeyword))
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
475localDllImport = localDllImport.AddAttributeLists(returnTypeAttributes.WithTarget(AttributeTargetSpecifier(Token(SyntaxKind.ReturnKeyword))));
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
350localDllImport = localDllImport.AddAttributeLists(returnTypeAttributes.WithTarget(AttributeTargetSpecifier(Token(SyntaxKind.ReturnKeyword))));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
448case SyntaxKind.ReturnKeyword when token.Parent.IsKind(SyntaxKind.YieldReturnStatement):