title: Uglify SyntaxError: Unexpected token: punc ())
body: <p>I am trying to use gulp in order to minify a folder containing JS files. However, one of the files has the above error, preventing it from being minified.</p>
  
  <p>I managed to catch and print the error, which I've partially printed here:</p>
  
  <pre><code>JS_Parse_Error {
   message: 'SyntaxError: Unexpected token: punc ())',
   filename: 'ex.js',
   line: 189,
   col: 25,
   pos: 6482,
   stack: Error\n    at new JS_Parse_Error (eval at &lt;anonymous&gt; ... ) 
   plugin: 'gulp-uglify',
   fileName: '.../js/ex.js',
   showStack: false
  }
  </code></pre>
  
  <p>The file in question contains the following, shortened:</p>
  
  <pre><code>function() {
    ...
    $.confirm({
      buttons: {
          confirm: function() {
              $.post('/ajax-handler', {
                      ...
                  })
                  .done( function(response) {
                      var data = filterResponse(response);
                      if (data['status'] == 'success') {
                          sleep(1000).then(() =&gt; {
                      *       ...
                          });
                          sleep(5000).then(() =&gt; {
                              ...  
                          });
  
                      } else {
                          console.log('Oops!');
                      }
                  })
                  .fail( function(err, status, response) {
                      ...
              });
          },
          cancel: function() {}
      }
   });
    ...
  }
  </code></pre>
  
  <p>I added the "*" above in order to indicate the exact position listed by JS_Parse_Error.</p>