46 references to ThrowKeyword
Microsoft.CodeAnalysis.CSharp (18)
Parser\LanguageParser.cs (7)
8303case SyntaxKind.ThrowKeyword: 9199case SyntaxKind.ThrowKeyword: 10262Debug.Assert(this.CurrentToken.Kind == SyntaxKind.ThrowKeyword); 10265this.EatToken(SyntaxKind.ThrowKeyword), 11071case SyntaxKind.ThrowKeyword: 11454if (tk == SyntaxKind.ThrowKeyword) 11873this.EatToken(SyntaxKind.ThrowKeyword),
Syntax.xml.Internal.Generated.cs (4)
30229if (throwKeyword.Kind != SyntaxKind.ThrowKeyword) throw new ArgumentException(nameof(throwKeyword)); 30996if (throwKeyword.Kind != SyntaxKind.ThrowKeyword) throw new ArgumentException(nameof(throwKeyword)); 35617if (throwKeyword.Kind != SyntaxKind.ThrowKeyword) throw new ArgumentException(nameof(throwKeyword)); 36384if (throwKeyword.Kind != SyntaxKind.ThrowKeyword) throw new ArgumentException(nameof(throwKeyword));
Syntax.xml.Main.Generated.cs (5)
3710if (throwKeyword.Kind() != SyntaxKind.ThrowKeyword) throw new ArgumentException(nameof(throwKeyword)); 3717=> SyntaxFactory.ThrowExpression(SyntaxFactory.Token(SyntaxKind.ThrowKeyword), expression); 4257if (throwKeyword.Kind() != SyntaxKind.ThrowKeyword) throw new ArgumentException(nameof(throwKeyword)); 4264=> SyntaxFactory.ThrowStatement(attributeLists, SyntaxFactory.Token(SyntaxKind.ThrowKeyword), expression, SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 4269=> SyntaxFactory.ThrowStatement(default, SyntaxFactory.Token(SyntaxKind.ThrowKeyword), expression, SyntaxFactory.Token(SyntaxKind.SemicolonToken));
Syntax\SyntaxKindFacts.cs (2)
944return SyntaxKind.ThrowKeyword; 1648case SyntaxKind.ThrowKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
80Token(leadingTrivia, SyntaxKind.ThrowKeyword, trailing: default),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2609if (token.IsKind(SyntaxKind.ThrowKeyword))
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\KeywordRecommenders\ThrowKeywordRecommender.cs (1)
10internal sealed class ThrowKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.ThrowKeyword)
ExtractMethod\Extensions.cs (1)
147if (token.Kind() != SyntaxKind.ThrowKeyword)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
80Token(leadingTrivia, SyntaxKind.ThrowKeyword, trailing: default),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (20)
Generated\Syntax.Test.xml.Generated.cs (8)
275=> InternalSyntaxFactory.ThrowExpression(InternalSyntaxFactory.Token(SyntaxKind.ThrowKeyword), GenerateIdentifierName()); 389=> InternalSyntaxFactory.ThrowStatement(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), InternalSyntaxFactory.Token(SyntaxKind.ThrowKeyword), null, InternalSyntaxFactory.Token(SyntaxKind.SemicolonToken)); 1796Assert.Equal(SyntaxKind.ThrowKeyword, node.ThrowKeyword.Kind); 2247Assert.Equal(SyntaxKind.ThrowKeyword, node.ThrowKeyword.Kind); 10665=> SyntaxFactory.ThrowExpression(SyntaxFactory.Token(SyntaxKind.ThrowKeyword), GenerateIdentifierName()); 10779=> SyntaxFactory.ThrowStatement(new SyntaxList<AttributeListSyntax>(), SyntaxFactory.Token(SyntaxKind.ThrowKeyword), default(ExpressionSyntax), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 12186Assert.Equal(SyntaxKind.ThrowKeyword, node.ThrowKeyword.Kind()); 12637Assert.Equal(SyntaxKind.ThrowKeyword, node.ThrowKeyword.Kind());
Parsing\CollectionExpressionParsingTests.cs (1)
6503N(SyntaxKind.ThrowKeyword);
Parsing\DeclarationParsingTests_MissingIdentifiers.cs (1)
6220N(SyntaxKind.ThrowKeyword);
Parsing\ForStatementParsingTest.cs (3)
4178N(SyntaxKind.ThrowKeyword); 4187N(SyntaxKind.ThrowKeyword); 4196N(SyntaxKind.ThrowKeyword);
Parsing\MemberDeclarationParsingTests.cs (1)
14010N(SyntaxKind.ThrowKeyword);
Parsing\PartialEventsAndConstructorsParsingTests.cs (1)
879N(SyntaxKind.ThrowKeyword);
Parsing\PatternParsingTests.cs (1)
207N(SyntaxKind.ThrowKeyword);
Parsing\StatementAttributeParsingTests.cs (1)
615N(SyntaxKind.ThrowKeyword);
Parsing\StatementParsingTests.cs (2)
1195Assert.Equal(SyntaxKind.ThrowKeyword, ts.ThrowKeyword.ContextualKind()); 1215Assert.Equal(SyntaxKind.ThrowKeyword, ts.ThrowKeyword.ContextualKind());
Parsing\SwitchExpressionParsingTests.cs (1)
428N(SyntaxKind.ThrowKeyword);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Classification\ClassificationHelpers.cs (1)
88case SyntaxKind.ThrowKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2609if (token.IsKind(SyntaxKind.ThrowKeyword))
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2609if (token.IsKind(SyntaxKind.ThrowKeyword))