Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch etc are not a keyword in the method position #31

Open
spion opened this issue Mar 12, 2016 · 1 comment
Open

catch etc are not a keyword in the method position #31

spion opened this issue Mar 12, 2016 · 1 comment

Comments

@spion
Copy link

spion commented Mar 12, 2016

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)
@sinelaw
Copy link
Owner

sinelaw commented Mar 13, 2016

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 notifications@github.com
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
#31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants