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

'async function*' does not parse #1917

Open
PetarMax opened this Issue Mar 7, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@PetarMax

PetarMax commented Mar 7, 2018

Steps to reproduce

esprima.parse('var AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor;')

Expected output

A valid syntax tree.

Actual output

Error: Line 1: Unexpected token *

Relevant references

This code is part of a test262 test that can be found at https://github.com/tc39/test262/blob/master/test/built-ins/AsyncGeneratorFunction/extensibility.js. Since the test is not negative, I believe that the code is syntactically correct. It executes in Chrome.

@PetarMax

This comment has been minimized.

PetarMax commented Mar 7, 2018

Note: there seem to be 2854 non-negative test262 tests affected in the same way (Error: Unexpected token *).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment