55 references to OperatorPrecedence
Microsoft.CodeAnalysis.CSharp.Workspaces (55)
Recommendations\CSharpRecommendationServiceRunner.cs (4)
233child.GetOperatorPrecedence() < OperatorPrecedence.Primary) 238var precedence = currentExpression.GetOperatorPrecedence(); 239if (precedence != OperatorPrecedence.None && precedence < OperatorPrecedence.Primary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (19)
694public static OperatorPrecedence GetOperatorPrecedence(this ExpressionSyntax expression) 718return OperatorPrecedence.Primary; 735return OperatorPrecedence.Unary; 741return OperatorPrecedence.Range; 749return OperatorPrecedence.Multiplicative; 756return OperatorPrecedence.Additive; 763return OperatorPrecedence.Shift; 775return OperatorPrecedence.RelationalAndTypeTesting; 782return OperatorPrecedence.Equality; 788return OperatorPrecedence.LogicalAnd; 794return OperatorPrecedence.LogicalXor; 800return OperatorPrecedence.LogicalOr; 806return OperatorPrecedence.ConditionalAnd; 812return OperatorPrecedence.ConditionalOr; 818return OperatorPrecedence.NullCoalescing; 824return OperatorPrecedence.Conditional; 842return OperatorPrecedence.AssignmentAndLambdaExpression; 845return OperatorPrecedence.Switch; 848return OperatorPrecedence.None;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (17)
392var precedence = expression.GetOperatorPrecedence(); 393var parentPrecedence = parentExpression.GetOperatorPrecedence(); 394if (precedence == OperatorPrecedence.None || parentPrecedence == OperatorPrecedence.None) 711var patternPrecedence = pattern.GetOperatorPrecedence(); 712if (patternPrecedence is OperatorPrecedence.Primary or OperatorPrecedence.Unary) 747var precedence = pattern.GetOperatorPrecedence(); 748var parentPrecedence = parentPattern.GetOperatorPrecedence(); 749if (precedence == OperatorPrecedence.None || parentPrecedence == OperatorPrecedence.None) 759public static OperatorPrecedence GetOperatorPrecedence(this PatternSyntax pattern) 769return OperatorPrecedence.Primary; 773return OperatorPrecedence.Unary; 777return OperatorPrecedence.ConditionalAnd; 780return OperatorPrecedence.ConditionalOr; 786return OperatorPrecedence.None;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\Precedence\AbstractCSharpPrecedenceService.cs (13)
12internal abstract class AbstractCSharpPrecedenceService<TSyntax> : AbstractPrecedenceService<TSyntax, OperatorPrecedence> 19public sealed override PrecedenceKind GetPrecedenceKind(OperatorPrecedence precedence) 23case OperatorPrecedence.NullCoalescing: return PrecedenceKind.Coalesce; 24case OperatorPrecedence.ConditionalOr: 25case OperatorPrecedence.ConditionalAnd: return PrecedenceKind.Logical; 26case OperatorPrecedence.LogicalOr: 27case OperatorPrecedence.LogicalXor: 28case OperatorPrecedence.LogicalAnd: return PrecedenceKind.Bitwise; 29case OperatorPrecedence.Equality: return PrecedenceKind.Equality; 30case OperatorPrecedence.RelationalAndTypeTesting: return PrecedenceKind.Relational; 31case OperatorPrecedence.Shift: return PrecedenceKind.Shift; 32case OperatorPrecedence.Additive: 33case OperatorPrecedence.Multiplicative: return PrecedenceKind.Arithmetic;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\Precedence\CSharpExpressionPrecedenceService.cs (1)
20public override OperatorPrecedence GetOperatorPrecedence(ExpressionSyntax expression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\Precedence\CSharpPatternPrecedenceService.cs (1)
20public override OperatorPrecedence GetOperatorPrecedence(PatternSyntax pattern)