34 references to WalkUpParentheses
Microsoft.CodeAnalysis.CSharp.Workspaces (34)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
235expression = expression.WalkUpParentheses(); 912var topExpression = expression.WalkUpParentheses();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
432var topExpression = expression.WalkUpParentheses();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (30)
56!cast.WalkUpParentheses().ContainsDiagnostics && 63if (cast.WalkUpParentheses().ContainsDiagnostics) 124var leftOrRightChild = castExpression.WalkUpParentheses(); 159if (castExpression.WalkUpParentheses().Parent is PrefixUnaryExpressionSyntax(SyntaxKind.BitwiseNotExpression) parent && 160parent.WalkUpParentheses().Parent is CastExpressionSyntax parentCast) 183Contract.ThrowIfTrue(castNode.WalkUpParentheses().ContainsDiagnostics); 192if (isDefaultLiteralCast && castNode.WalkUpParentheses().Parent is PatternSyntax or CaseSwitchLabelSyntax) 230if (castSyntax.WalkUpParentheses().GetRequiredParent().Kind() is SyntaxKind.BitwiseOrExpression or SyntaxKind.OrAssignmentExpression) 314var originalConvertedType = originalSemanticModel.GetTypeInfo(castNode.WalkUpParentheses(), cancellationToken).ConvertedType; 364if (rewrittenConversion.IsExplicit && castNode.WalkUpParentheses().Parent is not InterpolationSyntax) 451if (castNode.WalkUpParentheses().Parent is MemberAccessExpressionSyntax memberAccessExpression) 484if (castNode.WalkUpParentheses().Parent is InvocationExpressionSyntax invocationExpression) 503if (castNode.WalkUpParentheses().Parent is BinaryExpressionSyntax(SyntaxKind.IsExpression) isExpression && 713if (castNode.WalkUpParentheses().Parent is not MemberAccessExpressionSyntax { Parent: InvocationExpressionSyntax } memberAccessExpression) 786var parent = castNode.WalkUpParentheses().GetRequiredParent(); 791var rewrittenBitwiseNotExpression = (PrefixUnaryExpressionSyntax)rewrittenExpression.WalkUpParentheses().GetRequiredParent(); 831var parent = castExpression.WalkUpParentheses(); 836var rewrittenConditionalExpression = (ConditionalExpressionSyntax)rewrittenExpression.WalkUpParentheses().GetRequiredParent(); 910var parentBinary = expression.WalkUpParentheses().GetRequiredParent() as BinaryExpressionSyntax; 1007var parent = castOrAsNode.WalkUpParentheses(); 1077castNode = castNode.WalkUpParentheses(); 1132for (SyntaxNode? currentOld = castNode.WalkUpParentheses().Parent, currentNew = rewrittenExpression.WalkUpParentheses().Parent; 1188for (SyntaxNode? currentOld = castNode.WalkUpParentheses().Parent, currentNew = rewrittenExpression.WalkUpParentheses().Parent; 1218for (SyntaxNode? currentOld = castNode.WalkUpParentheses().Parent, currentNew = rewrittenExpression.WalkUpParentheses().Parent; 1255var rewrittenMemberAccessExpression = (MemberAccessExpressionSyntax)rewrittenExpression.WalkUpParentheses().GetRequiredParent(); 1364var rewrittenMemberAccessExpression = (InvocationExpressionSyntax)rewrittenExpression.WalkUpParentheses().GetRequiredParent(); 1494if (castNode.WalkUpParentheses().Parent is InterpolationSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
130expression = expression.WalkUpParentheses();