EditAndContinue\CSharpEditAndContinueAnalyzer.cs (54)
118RoslynDebug.Assert(current.Parent.IsKind(SyntaxKind.VariableDeclaration));
185Debug.Assert(memberBody.IsKind(SyntaxKind.Block) || memberBody is ExpressionSyntax);
207where node.IsKind(SyntaxKind.IdentifierName)
233if (node.IsKind(SyntaxKind.VariableDeclarator))
299if (bodyOrMatchRoot.Parent.IsKind(SyntaxKind.ConstructorDeclaration))
306if (bodyOrMatchRoot.IsKind(SyntaxKind.EqualsValueClause) &&
307bodyOrMatchRoot.Parent.IsKind(SyntaxKind.VariableDeclarator) &&
308bodyOrMatchRoot.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration))
315if (bodyOrMatchRoot.Parent.IsKind(SyntaxKind.EqualsValueClause) &&
316bodyOrMatchRoot.Parent.Parent.IsKind(SyntaxKind.VariableDeclarator) &&
317bodyOrMatchRoot.Parent.Parent.Parent.IsKind(SyntaxKind.FieldDeclaration))
342if (declarationBody.Parent.IsKind(SyntaxKind.ConstructorDeclaration))
580if (oldBody is ExpressionSyntax || newBody is ExpressionSyntax || (oldBody.Parent.IsKind(SyntaxKind.LocalFunctionStatement) && newBody.Parent.IsKind(SyntaxKind.LocalFunctionStatement)))
604return parent.IsKind(SyntaxKind.ArrowExpressionClause) && parent.Parent.IsKind(SyntaxKind.LocalFunctionStatement) ? parent.Parent : parent;
612if (oldBody.Parent.IsKind(SyntaxKind.ConstructorDeclaration))
616RoslynDebug.Assert(oldBody.IsKind(SyntaxKind.Block));
617RoslynDebug.Assert(newBody.IsKind(SyntaxKind.Block));
618RoslynDebug.Assert(newBody.Parent.IsKind(SyntaxKind.ConstructorDeclaration));
668if (oldNode.IsKind(SyntaxKind.CompilationUnit) || newNode.IsKind(SyntaxKind.CompilationUnit))
704else if (property.AccessorList.Accessors.Any(a => a.IsKind(SyntaxKind.SetAccessorDeclaration)))
752var newConstructor = (ConstructorDeclarationSyntax)(newBody.Parent.IsKind(SyntaxKind.ArrowExpressionClause) ? newBody.Parent.Parent : newBody.Parent)!;
762if (oldStatement == oldBody && !newBody.IsKind(SyntaxKind.Block))
787=> node.IsKind(SyntaxKind.GlobalStatement);
1151=> node.IsKind(SyntaxKind.InterfaceDeclaration);
1232=> constructorDeclaration is ConstructorDeclarationSyntax ctor && (ctor.Initializer == null || ctor.Initializer.IsKind(SyntaxKind.BaseConstructorInitializer));
1375if (node.IsKind(SyntaxKind.GetAccessorDeclaration))
1377Debug.Assert(node.Parent.IsKind(SyntaxKind.AccessorList));
1397if (node.IsKind(SyntaxKind.TypeParameterConstraintClause))
1403if (node.IsKind(SyntaxKind.GlobalStatement))
1419return oldNode.IsKind(SyntaxKind.LocalFunctionStatement)
1438if (node.IsKind(SyntaxKind.TypeParameterConstraintClause))
1446if (node.IsKind(SyntaxKind.GlobalStatement))
1466=> node.IsKind(SyntaxKind.LocalFunctionStatement) ||
1477=> node.IsKind(SyntaxKind.LocalFunctionStatement);
2044if (node.Parent!.Parent!.IsKind(SyntaxKind.PropertyDeclaration))
2050RoslynDebug.Assert(node.Parent.Parent.IsKind(SyntaxKind.IndexerDeclaration));
2056if (node.Parent!.Parent!.IsKind(SyntaxKind.PropertyDeclaration))
2062RoslynDebug.Assert(node.Parent.Parent.IsKind(SyntaxKind.IndexerDeclaration));
2339if (_newNode.IsKind(SyntaxKind.LocalFunctionStatement))
2706if (newNode.IsKind(SyntaxKind.AwaitExpression) && oldNode.IsKind(SyntaxKind.AwaitExpression))
2738if (deletedSuspensionPoint.IsKind(SyntaxKind.VariableDeclarator) &&
2772if (insertedSuspensionPoint.IsKind(SyntaxKind.VariableDeclarator) &&
2826Debug.Assert(awaitExpression.IsKind(SyntaxKind.AwaitExpression));
2885return assignment.Left.IsKind(SyntaxKind.IdentifierName) && assignment.Right == awaitExpression;
2916if (!oldActiveStatement.IsKind(SyntaxKind.WhenClause))
2931Debug.Assert(newActiveStatement.IsKind(SyntaxKind.WhenClause));
3039ReportUnmatchedStatements<LockStatementSyntax>(diagnostics, match, n => n.IsKind(SyntaxKind.LockStatement), oldActiveStatement, newActiveStatement,
3043ReportUnmatchedStatements<FixedStatementSyntax>(diagnostics, match, n => n.IsKind(SyntaxKind.FixedStatement), oldActiveStatement, newActiveStatement,
3060n => n.IsKind(SyntaxKind.ForEachStatement) || n.IsKind(SyntaxKind.ForEachVariableStatement),