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

Support global return outside of tolerant mode #2019

Open
crfrolik opened this issue Mar 19, 2020 · 0 comments
Open

Support global return outside of tolerant mode #2019

crfrolik opened this issue Mar 19, 2020 · 0 comments

Comments

@crfrolik
Copy link

@crfrolik crfrolik commented Mar 19, 2020

Steps to reproduce

esprima.parseScript('if (foo) { return 5; } else { return 6; }');

I would like to be able to successfully parse this without an Illegal return statement error, but also without using {tolerant: true} (which comes with additional baggage I don't want).

See also: espree's globalReturn flag.

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.