30 references to PrecedenceKind
Microsoft.CodeAnalysis.CodeStyle (30)
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (11)
48protected static string GetEquivalenceKey(PrecedenceKind precedenceKind) 51PrecedenceKind.Arithmetic or PrecedenceKind.Shift or PrecedenceKind.Bitwise => "ArithmeticBinary", 52PrecedenceKind.Relational or PrecedenceKind.Equality => "RelationalBinary", 53PrecedenceKind.Logical or PrecedenceKind.Coalesce => "OtherBinary", 54PrecedenceKind.Other => "Other", 103var childPrecedenceKind = _precedenceService.GetPrecedenceKind(binaryLike); 104var parentPrecedenceKind = _precedenceService.GetPrecedenceKind(parentBinaryLike);
src\Analyzers\Core\Analyzers\ParenthesesDiagnosticAnalyzersHelper.cs (9)
24internal static CodeStyleOption2<ParenthesesPreference> GetLanguageOption(AnalyzerOptionsProvider options, PrecedenceKind precedenceKind) 27PrecedenceKind.Arithmetic or PrecedenceKind.Shift or PrecedenceKind.Bitwise => options.ArithmeticBinaryParentheses, 28PrecedenceKind.Relational or PrecedenceKind.Equality => options.RelationalBinaryParentheses, 29PrecedenceKind.Logical or PrecedenceKind.Coalesce => options.OtherBinaryParentheses, 30PrecedenceKind.Other => options.OtherParentheses,
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (5)
45out PrecedenceKind precedence, out bool clarifiesPrecedence); 53out var precedence, out var clarifiesPrecedence)) 67case PrecedenceKind.Shift: 68case PrecedenceKind.Bitwise: 69case PrecedenceKind.Coalesce:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\Precedence\IPrecedenceService.cs (5)
13/// <see cref="PrecedenceKind"/> values. The mapping is language specific. 15PrecedenceKind GetPrecedenceKind(int operatorPrecedence); 35PrecedenceKind IPrecedenceService.GetPrecedenceKind(int operatorPrecedence) 39public abstract PrecedenceKind GetPrecedenceKind(TOperatorPrecedence operatorPrecedence); 44public static PrecedenceKind GetPrecedenceKind(this IPrecedenceService service, SyntaxNode expression)