infernu
infernu copied to clipboard
`catch` etc are not a keyword in the method position
Try checking the following
function test() {
return Promise.resolve(1).catch(function(e) {
return 2;
});
}
Result
infernu: user error ("test.js" (line 2, column 34):
unexpected reserved word "catch"
expecting letter or digit)
Yes, the problem is the parser lib being used. There's an ES5 branch of infernu that should work (didn't check yet)
On Sun, Mar 13, 2016 at 12:47 AM, Gorgi Kosev [email protected] wrote:
Try checking the following
function test() { return Promise.resolve(1).catch(function(e) { return 2; }); }
Result
infernu: user error ("test.js" (line 2, column 34): unexpected reserved word "catch" expecting letter or digit)
— Reply to this email directly or view it on GitHub https://github.com/sinelaw/infernu/issues/31.