rspivak / slimit

SlimIt - a JavaScript minifier/parser in Python
MIT License
550 stars 94 forks source link

SyntaxError: Unexpected token (CATCH, 'catch') at 1:9034 between LexToken(PERIOD,'.',1,9033) and LexToken(LPAREN,'(',1,9039) #81

Open mitar opened 8 years ago

mitar commented 8 years ago

For:

  evalCommandPromise.then(function () {
    callback(null, script.runInThisContext());
  }).catch(callback);
ztane commented 8 years ago

Haha unfortunate ES6 property name. I guess you could rewrite that code as ...)['catch'](callback)

mitar commented 8 years ago

Yea, sadly I would like to use slimit for automatic parser of the code. So I have first to parse it to be able to automatically convert it. Catch 22. ;-)

ztane commented 8 years ago

Well you could tokenize the source code and replace a . followed by catch keyword by ['catch'] - no parser needed ;)

On a more serious side, I wonder if still @rspivak is interested in developing/maintaining slimit

metatoaster commented 7 years ago

This is related to #59