(no title)
palish | 14 years ago
On the other hand, is "do" the only reserved keyword which matters? Then it might be okay to special case that one instance as well.
There is no doubt that my approach is the wrong approach; I'm just curious whether it's easier to handle each of the ~dozen special cases than to fundamentally rewrite JSMin (as a full ECMAScript parser).
EDIT: Amusingly, I've special-cased the 'do' keyword in a fairly straightforward way, so now the code handles every example thus far. I wonder if these are the only special cases required, and whether they add any adverse side-effects. Also, you're extremely talented and creative.
thezilch|14 years ago