79 references to Precedence
Microsoft.CodeAnalysis.CSharp (79)
Parser\LanguageParser.cs (64)
4354var refKeyword = this.CurrentToken.Kind == SyntaxKind.RefKeyword && !this.IsPossibleLambdaExpression(Precedence.Expression) 5538var refKeyword = isLocalOrField && !isConst && this.CurrentToken.Kind == SyntaxKind.RefKeyword && !this.IsPossibleLambdaExpression(Precedence.Expression) 9706: this.ParseSubExpression(Precedence.Expression); 10118ParseWhenClause(Precedence.Expression), 10546private WhenClauseSyntax ParseWhenClause(Precedence precedence) 10906return this.ParseSubExpression(Precedence.Expression); 10969return IsPossibleAnonymousMethodExpression() || IsPossibleLambdaExpression(Precedence.Expression); 11060private static Precedence GetPrecedence(SyntaxKind op) 11065return Precedence.Expression; 11069return Precedence.Lambda; 11083return Precedence.Assignment; 11086return Precedence.Coalescing; 11088return Precedence.ConditionalOr; 11090return Precedence.ConditionalAnd; 11092return Precedence.LogicalOr; 11094return Precedence.LogicalXor; 11096return Precedence.LogicalAnd; 11099return Precedence.Equality; 11107return Precedence.Relational; 11110return Precedence.Switch; 11114return Precedence.Shift; 11117return Precedence.Additive; 11121return Precedence.Multiplicative; 11137return Precedence.Unary; 11139return Precedence.Cast; 11141return Precedence.PointerIndirection; 11143return Precedence.AddressOf; 11145return Precedence.Range; 11147return Precedence.Expression; 11186return Precedence.Primary; 11268private ExpressionSyntax ParseSubExpression(Precedence precedence) 11283private ExpressionSyntax ParseSubExpressionCore(Precedence precedence) 11299ExpressionSyntax parseUnaryOrPrimaryExpression(Precedence precedence) 11320? this.ParseSubExpression(Precedence.Range) 11348return precedence <= Precedence.Coalescing 11368private ExpressionSyntax ParseExpressionContinued(ExpressionSyntax unaryOrPrimaryExpression, Precedence precedence) 11388if (this.CurrentToken.Kind == SyntaxKind.QuestionToken && precedence <= Precedence.Conditional) 11393ExpressionSyntax? tryExpandExpression(ExpressionSyntax leftOperand, Precedence precedence) 11404var newPrecedence = GetPrecedence(operatorExpressionKind); 11459? this.ParseSubExpression(Precedence.Range) 11673Debug.Assert(GetPrecedence(operatorExpressionKind) == Precedence.Assignment); 11679!this.IsPossibleLambdaExpression(Precedence.Assignment)) 11687rhs = this.ParseSubExpression(Precedence.Assignment); 11764this.ParseSubExpression(Precedence.Coalescing)); 11778private ExpressionSyntax ParsePrimaryExpression(Precedence precedence) 11787ExpressionSyntax parsePrimaryExpressionWithoutPostfix(Precedence precedence) 12050private bool IsPossibleDeconstructionLeft(Precedence precedence) 12052if (precedence > Precedence.Assignment || !(this.CurrentToken.IsIdentifierVar() || IsPredefinedType(this.CurrentToken.Kind))) 12412this.IsPossibleLambdaExpression(Precedence.Expression))) 12437: ParseSubExpression(Precedence.Expression); 12483this.ParseSubExpression(Precedence.Expression), 12492this.ParseSubExpression(Precedence.Expression), 12506this.ParseSubExpression(Precedence.Expression), 12515this.ParseSubExpression(Precedence.Expression), 12521private bool ScanParenthesizedLambda(Precedence precedence) 12531private bool ScanImplicitlyTypedLambdaOrSimpleExplicitlyTypedParenthesizedLambda(Precedence precedence) 12535if (precedence > Precedence.Lambda) 12562private bool ScanExplicitlyTypedLambda(Precedence precedence) 12566if (precedence > Precedence.Lambda) 12658this.ParseSubExpression(Precedence.Cast)); 12850private bool IsPossibleLambdaExpression(Precedence precedence) 12852if (precedence > Precedence.Lambda) 13919private QueryExpressionSyntax ParseQueryExpression(Precedence precedence) 13925precedence <= 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),