7 Commits

Author SHA1 Message Date
Matthias Mullie
97a8f64bab Improve whitespace stripping around certain operators
1: some were not stripped agressively enough. E.g.:
   return !0 -> return!0
2: some were stripped too aggressive. E.g.:
   func()
   {1+2}
   Should not be joined on 1 line, since func() could be a function
   call and {1+2} an unrelated piece of code

Fixes issue #130
2016-09-14 13:13:59 +02:00
Geovani
f34438d734 More JS keywords reserved 2016-06-29 23:15:37 -03:00
Matthias Mullie
5497bea3d1 Don't collapse line feeds after "return"
return is not guaranteed to be followed by a return value.
It could just be "return", followed by nothing (void return),
not even a semicolon, just line feed (ASI)
Whatever is next could, for example, be another operator.
We may just need ASI to kick in there, so keep the line feed
after return.

Fixes issue #54
2015-06-29 17:51:16 +02:00
Matthias Mullie
778c63c8eb Don't replace reserved words by property notation
Fixes #41
2015-02-26 08:41:17 +01:00
Matthias Mullie
3135b0fcb2 Other approach: don't add semicolons, just keep newline when in doubt 2014-10-08 09:57:41 +02:00
Matthias Mullie
9fa994fda6 Add comma as operator 2014-10-07 19:49:16 +02:00
Matthias Mullie
6a864c8c7c Major JS minifier rewrite 2014-10-07 18:21:22 +02:00