slimit icon indicating copy to clipboard operation
slimit copied to clipboard

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

Open mitar opened this issue 9 years ago • 4 comments

For:

  evalCommandPromise.then(function () {
    callback(null, script.runInThisContext());
  }).catch(callback);

mitar avatar Oct 29 '15 23:10 mitar

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

ztane avatar Nov 08 '15 12:11 ztane

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. ;-)

mitar avatar Nov 09 '15 01:11 mitar

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

ztane avatar Nov 09 '15 21:11 ztane

This is related to #59

metatoaster avatar Jun 08 '17 04:06 metatoaster