76 references to Precedence
Microsoft.CodeAnalysis.CSharp (76)
Parser\LanguageParser.cs (61)
4160var refKeyword = this.CurrentToken.Kind == SyntaxKind.RefKeyword && !this.IsPossibleLambdaExpression(Precedence.Expression) 5327var refKeyword = isLocalOrField && !isConst && this.CurrentToken.Kind == SyntaxKind.RefKeyword && !this.IsPossibleLambdaExpression(Precedence.Expression) 9417: this.ParseSubExpression(Precedence.Expression); 9829ParseWhenClause(Precedence.Expression), 10257private WhenClauseSyntax ParseWhenClause(Precedence precedence) 10624return this.ParseSubExpression(Precedence.Expression); 10687return IsPossibleAnonymousMethodExpression() || IsPossibleLambdaExpression(Precedence.Expression); 10778private static Precedence GetPrecedence(SyntaxKind op) 10783return Precedence.Expression; 10787return Precedence.Lambda; 10801return Precedence.Assignment; 10804return Precedence.Coalescing; 10806return Precedence.ConditionalOr; 10808return Precedence.ConditionalAnd; 10810return Precedence.LogicalOr; 10812return Precedence.LogicalXor; 10814return Precedence.LogicalAnd; 10817return Precedence.Equality; 10825return Precedence.Relational; 10828return Precedence.Switch; 10832return Precedence.Shift; 10835return Precedence.Additive; 10839return Precedence.Multiplicative; 10855return Precedence.Unary; 10857return Precedence.Cast; 10859return Precedence.PointerIndirection; 10861return Precedence.AddressOf; 10863return Precedence.Range; 10865return Precedence.Expression; 10904return Precedence.Primary; 10986private ExpressionSyntax ParseSubExpression(Precedence precedence) 11001private ExpressionSyntax ParseSubExpressionCore(Precedence precedence) 11017ExpressionSyntax parseUnaryOrPrimaryExpression(Precedence precedence) 11038? this.ParseSubExpression(Precedence.Range) 11066return precedence <= Precedence.Coalescing 11086private ExpressionSyntax ParseExpressionContinued(ExpressionSyntax unaryOrPrimaryExpression, Precedence precedence) 11106if (this.CurrentToken.Kind == SyntaxKind.QuestionToken && precedence <= Precedence.Conditional) 11111ExpressionSyntax? tryExpandExpression(ExpressionSyntax leftOperand, Precedence precedence) 11122var newPrecedence = GetPrecedence(operatorExpressionKind); 11177? this.ParseSubExpression(Precedence.Range) 11467this.ParseSubExpression(Precedence.Coalescing)); 11481private ExpressionSyntax ParsePrimaryExpression(Precedence precedence) 11490ExpressionSyntax parsePrimaryExpressionWithoutPostfix(Precedence precedence) 11755private bool IsPossibleDeconstructionLeft(Precedence precedence) 11757if (precedence > Precedence.Assignment || !(this.CurrentToken.IsIdentifierVar() || IsPredefinedType(this.CurrentToken.Kind))) 12067this.IsPossibleLambdaExpression(Precedence.Expression))) 12092: ParseSubExpression(Precedence.Expression); 12138this.ParseSubExpression(Precedence.Expression), 12147this.ParseSubExpression(Precedence.Expression), 12161this.ParseSubExpression(Precedence.Expression), 12170this.ParseSubExpression(Precedence.Expression), 12176private bool ScanParenthesizedLambda(Precedence precedence) 12186private bool ScanImplicitlyTypedLambdaOrSimpleExplicitlyTypedParenthesizedLambda(Precedence precedence) 12190if (precedence > Precedence.Lambda) 12217private bool ScanExplicitlyTypedLambda(Precedence precedence) 12221if (precedence > Precedence.Lambda) 12313this.ParseSubExpression(Precedence.Cast)); 12505private bool IsPossibleLambdaExpression(Precedence precedence) 12507if (precedence > Precedence.Lambda) 13587private QueryExpressionSyntax ParseQueryExpression(Precedence precedence) 13592if (precedence > Precedence.Assignment)
Parser\LanguageParser_Patterns.cs (15)
53private PatternSyntax ParsePattern(Precedence precedence, bool afterIs = false, bool inSwitchArmPattern = false) 58private PatternSyntax ParseDisjunctivePattern(Precedence precedence, bool afterIs, bool inSwitchArmPattern) 104private PatternSyntax ParseConjunctivePattern(Precedence precedence, bool afterIs, bool inSwitchArmPattern) 158private PatternSyntax ParseNegatedPattern(Precedence precedence, bool afterIs, bool inSwitchArmPattern) 172private PatternSyntax ParsePrimaryPattern(Precedence precedence, bool afterIs, bool inSwitchArmPattern) 209Debug.Assert(precedence < Precedence.Shift); 212this.ParseSubExpression(Precedence.Relational)); 242bool CanTokenFollowTypeInPattern(Precedence precedence) 269private PatternSyntax? ParsePatternContinued(TypeSyntax? type, Precedence precedence, bool inSwitchArmPattern) 438var pattern = ParsePattern(Precedence.Conditional, inSwitchArmPattern: true); 507PatternSyntax pattern = ParsePattern(Precedence.Conditional); 516pattern = ParsePattern(Precedence.Conditional); 596var pattern = ParsePattern(Precedence.Coalescing, inSwitchArmPattern: true); 606ParseWhenClause(Precedence.Coalescing), 642static @this => @this.ParsePattern(Precedence.Conditional),