24 references to ThrowKeyword
Microsoft.CodeAnalysis.CSharp (8)
Binder\Binder_Statements.cs (2)
446diagnostics.Add(ErrorCode.ERR_BadEmptyThrow, node.ThrowKeyword.GetLocation()); 457diagnostics.Add(ErrorCode.ERR_BadEmptyThrowInFinally, node.ThrowKeyword.GetLocation());
Syntax.xml.Main.Generated.cs (1)
1879=> node.Update(VisitList(node.AttributeLists), VisitToken(node.ThrowKeyword), (ExpressionSyntax?)Visit(node.Expression), VisitToken(node.SemicolonToken));
Syntax.xml.Syntax.Generated.cs (4)
7319if (attributeLists != this.AttributeLists || throwKeyword != this.ThrowKeyword || expression != this.Expression || semicolonToken != this.SemicolonToken) 7330public new ThrowStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.ThrowKeyword, this.Expression, this.SemicolonToken); 7332public ThrowStatementSyntax WithExpression(ExpressionSyntax? expression) => Update(this.AttributeLists, this.ThrowKeyword, expression, this.SemicolonToken); 7333public ThrowStatementSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.ThrowKeyword, this.Expression, semicolonToken);
Syntax\LookupPosition.cs (1)
353return ((ThrowStatementSyntax)statement).ThrowKeyword;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
206expression = SyntaxFactory.ThrowExpression(throwStatement.ThrowKeyword, throwStatement.Expression);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionHelpers.cs (1)
22return SyntaxFactory.ThrowExpression(throwStatement.ThrowKeyword, throwStatement.Expression);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
2157if (previousToken.HasValue && previousToken.Value != throwStatement.ThrowKeyword)
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionHelpers.cs (1)
22return SyntaxFactory.ThrowExpression(throwStatement.ThrowKeyword, throwStatement.Expression);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Generated\Syntax.Test.xml.Generated.cs (2)
12583Assert.Equal(SyntaxKind.ThrowKeyword, node.ThrowKeyword.Kind()); 12586var newNode = node.WithAttributeLists(node.AttributeLists).WithThrowKeyword(node.ThrowKeyword).WithExpression(node.Expression).WithSemicolonToken(node.SemicolonToken);
Parsing\StatementParsingTests.cs (6)
1193Assert.NotEqual(default, ts.ThrowKeyword); 1194Assert.False(ts.ThrowKeyword.IsMissing); 1195Assert.Equal(SyntaxKind.ThrowKeyword, ts.ThrowKeyword.ContextualKind()); 1213Assert.NotEqual(default, ts.ThrowKeyword); 1214Assert.False(ts.ThrowKeyword.IsMissing); 1215Assert.Equal(SyntaxKind.ThrowKeyword, ts.ThrowKeyword.ContextualKind());
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
206expression = SyntaxFactory.ThrowExpression(throwStatement.ThrowKeyword, throwStatement.Expression);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
2157if (previousToken.HasValue && previousToken.Value != throwStatement.ThrowKeyword)
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
206expression = SyntaxFactory.ThrowExpression(throwStatement.ThrowKeyword, throwStatement.Expression);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
2157if (previousToken.HasValue && previousToken.Value != throwStatement.ThrowKeyword)