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

async keyword parsing #115

Open
linearray opened this issue Jun 1, 2020 · 3 comments
Open

async keyword parsing #115

linearray opened this issue Jun 1, 2020 · 3 comments

Comments

@linearray
Copy link

I think the async keyword is not always parsed correctly. At some stage in my compilation/deployment pipeline this file is being parsed https://github.com/purescript-web/purescript-web-html/blob/d6960bcf86763a1b8c83641b7f0b46506eb3886e/src/Web/HTML/HTMLScriptElement.js and I encounter this error

  Unable to parse foreign module:
  
    .spago/web-html/v2.3.0/src/Web/HTML/HTMLScriptElement.js
  
    The module could not be parsed:
  
    AsyncToken {tokenSpan = TokenPn 1062 57 30, tokenLiteral = "async", tokenComment = []}

It does work with 0.7.0.0 though and I think the usage of async in the file is legal.

@kurtmilam
Copy link

According to section 11.6.2 of the ECMAScript 2021 Language Specification:

async is not reserved; it can be used as a variable name or statement label without restriction.

@erikd
Copy link
Owner

erikd commented Jun 4, 2020

@linearray Would you be able to post the two or three lines around the mis-parse?

@linearray
Copy link
Author

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

3 participants