protected override bool IsValidContext(int position, CSharpSyntaxContext context, CancellationToken cancellationToken) { return (context.IsStatementContext || context.IsRegularTopLevelStatementsContext() || context.TargetToken.IsAfterYieldKeyword() || IsAttributeContext(context, cancellationToken)); }